Atomically thin sheets of sp(2)-hybridized carbon--graphene--have enormous potential for applications in future electronic devices. Particularly promising are nanostructured (sub)units of graphene, the electronic properties of which can be tuned by changing the spatial extent or the specific edge termination of the carbon network. Processability and precise tailoring of graphene-derived structures are, however, still major obstacles in developing applications; both bottom-up and top-down routes are presently under investigation in attempts to overcome this limitation. Here, we propose a surface chemical route that allows for the atomically precise fabrication of tailored nanographenes from polyphenylene precursors. The cyclodehydrogenation of a prototypical polyphenylene on Cu(111) is studied using scanning tunnelling microscopy and density functional theory. We find that the thermally induced cyclodehydrogenation proceeds via several intermediate steps, two of which can be stabilized on the surface, yielding unprecedented insight into a dehydrogenative intramolecular aryl-aryl coupling reaction.