The surface segregation profile of an intermetallic compound becomes vertically and laterally modulated upon epitaxial growth of a single-layer hexagonal boron nitride (h-BN) nanomesh. h-BN on PtRh(111) forms an 11-on-10 superhoneycomb, such as that on Rh(111) [Corso et al., Science 303, 217 (2004)], though with a smaller lattice constant of 2.73 nm. X-ray photoelectron diffraction shows that the h-BN layer reduces the Pt enrichment of the first layer by promoting site swapping of about 10 Pt-Rh pairs within the 10×10 unit cell between the first and second layers. This segregation profile is confirmed by density-functional-theory-based cluster-expansion calculations. Generally, a strong modulation of the h-BN bonding strength and a higher affinity to one of the constituents leads to self-assembly of top layer patches underneath the nanomesh pores.