We report an example that demonstrates the clear interdependence between surface-supported reactions and molecular-adsorption configurations. Two biphenyl-based molecules with two and four bromine substituents, i.e., 2,2'-dibromobiphenyl (DBBP) and 2,2',6,6'-tetrabromo-1,1'-biphenyl (TBBP), show completely different reaction pathways on a Ag(111) surface, leading to the selective formation of dibenzo[e,l]pyrene and biphenylene dimer, respectively. By combining low-temperature scanning tunneling microscopy, synchrotron radiation photoemission spectroscopy, and density functional theory calculations, we unravel the underlying reaction mechanism. After debromination, a biradical biphenyl can be stabilized by surface Ag adatoms, while a four-radical biphenyl undergoes spontaneous intramolecular annulation due to its extreme instability on Ag(111). Such different chemisorption-induced precursor states between DBBP and TBBP consequently lead to different reaction pathways after further annealing. In addition, using bond-resolving scanning tunneling microscopy and scanning tunneling spectroscopy, we determine with atomic precision the bond-length alternation of the biphenylene dimer product, which contains 4-, 6-, and 8-membered rings. The 4-membered ring units turn out to be radialene structures.