Graphene nanoribbons (GNRs) can be synthesized from molecular precursors with atomic precision. A prominent case is the 7-atom-wide armchair GNR made from 10,10′-dibromo-9,9′-bianthryl (DBBA) precursors on metal substrates through dehalogenation/polymerization followed by cyclodehydrogenation. We investigate the key aspects of the cyclodehydrogenation process by evaluating the energy profiles of various reaction pathways using density functional theory and the nudged elastic band method. The metal substrate plays a critical catalytic role by providing stronger adsorption for products and facilitating H desorption. For polyanthrylene on an extra layer of GNR on Au, the underlying GNR insulates it from the Au substrate and increases the reaction barriers, rendering the polyanthrylene “quasi-freestanding”. However, positive charge injection can induce localized cyclodehydrogenation. We find that this is due to the stabilization of an intermediate state through an arenium ion mechanism and favorable orbital symmetries. These results provide mechanistic insight into the effects of the metal substrate and charge injection on cyclodehydrogenation during GNR synthesis and offer guidance for the design and growth of new graphitic structures.