The molecular ligand pyrphyrin, a tetradentate bipyridine based macrocycle, represents an interesting but widely unexplored class of molecules. It resembles the well-known porphyrin, but consists of pyridyl subunits instead of pyrroles. Metal complexes based on pyrphyrin ligands have recently shown promise as water reduction catalysts in homogeneous photochemical water splitting reactions. In this study, the adsorption and metalation of pyrphyrin on a single crystalline Au(111) surface is investigated in an ultrahigh vacuum by means of scanning tunneling microscopy, low-energy electron diffraction, X-ray photoelectron spectroscopy and density functional theory. Pyrphyrin coverages of approximately one monolayer and less are obtained by sublimation of the molecules on the substrate kept at room temperature. The molecules self-assemble in two distinct phases of long-range molecular ordering depending on the surface coverage. The deposition of cobalt metal and subsequent annealing lead to the formation of Co-ligated pyrphyrin molecules accompanied by a pronounced change of the molecular self-assembly. Electronic structure calculations taking the herringbone reconstruction of Au(111) into account show that the molecules are physisorbed, but preferred adsorption sites are identified where Co and the N atoms of the two terminal cyano groups are optimally coordinated to the surface Au atoms. An intermediate state of the metalation reaction is observed and the reaction steps for the Co metalation of pyrphyrin molecules on Au(111) are established in a joint experimental and computational effort.