Ultraviolet (UV) processing in the interstellar medium (ISM) induces the dehydrogenation of hydrocarbons. Aliphatics, including alkanes, are present in different interstellar environments, being prevalently formed in evolved stars; thus, the dehydrogenation by UV photoprocessing of alkanes plays an important role in the chemistry of the ISM, leading to the formation of unsaturated hydrocarbons and eventually to aromatics, the latter ubiquitously detected in the ISM. Here, through combined experimental results and ab initio calculations, we show that UV absorption (mainly at the Lyα emission line of hydrogen at 121.6 nm) promotes an alkane to an excited Rydberg state from where it evolves toward fragmentation, inducing the formation of olefinic C=C bonds, which are necessary precursors of aromatic hydrocarbons. We show that the photochemistry of aliphatics in the ISM does not primarily produce direct hydrogen elimination but preferential C–C photocleavage. Our results provide an efficient synthetic route for the formation of unsaturated aliphatics, including propene and dienes, and suggest that aromatics could be formed in dark clouds by a bottom-up mechanism involving molecular fragments produced by UV photoprocessing of aliphatics.