The on-surface synthesis of an isomer of undecacene, bearing two four-membered rings and two para-quinodimethane moieties, starting from a tetramethyl-substituted diepoxy precursor, is presented. The transformation implies a thermal double deoxygenation followed by a stepwise double dehydrogenation reaction on the Au(111) surface, locally induced by inelastic tunneling electrons. This results in the transformation of para-dimethylbenzene moieties into non-aromatic para-quinodimethanes. The structures and electronic properties of the intermediate and final products are investigated at the single molecule level with high spatial resolution, using both scanning tunneling microscopy/spectroscopy and non-contact atomic force microscopy. The experimental results are supported by density functional theory calculations.