Plastic pollution is a planetary threat that has been exacerbated by the COVID-19 pandemic due to the surge in medical waste, personal protective equipment and takeaway packaging. A socially sustainable and economically viable method for plastic recycling should not use consumable materials such as co-reactants or solvents. Here we report that Ru nanoparticles on zeolitic HZSM-5 catalyse the solvent- and hydrogen-free upcycling of high-density polyethylene into a separable distribution of linear (C1 to C6) and cyclic (C7 to C15) hydrocarbons. The valuable monocyclic hydrocarbons accounted for 60.3 mol% of the total yield. Based on mechanistic studies, the dehydrogenation of polymer chains to form C=C bonds occurs on both Ru sites and acid sites in HZSM-5, whereas carbenium ions are generated on the acid sites via the protonation of the C=C bonds. Accordingly, optimizing the Ru and acid sites promoted the cyclization process, which requires the simultaneous existence of a C=C bond and a carbenium ion on a molecular chain at an appropriate distance, providing high activity and cyclic hydrocarbon selectivity.