Small and homogeneously dispersed Au and Pt nanoparticles (NPs) were prepared on polymeric carbon nitride (CNx)/mesoporous silica (SBA-15) composites, which were synthesized by thermal polycondensation of dicyandiamide-impregnated preformed SBA-15. By changing the condensation temperature, the degree of condensation and the loading of CNx can be controlled to give adjustable particle sizes of the Pt and Au NPs subsequently formed on the composites. In contrast to the pure SBA-15 support, coating of SBA-15 with polymeric CNx resulted in much smaller and better-dispersed metal NPs. Furthermore, under catalytic conditions the CNx coating helps to stabilize the metal NPs. However, metal NPs on CNx/SBA-15 can show very different catalytic behaviors in, for example, the CO oxidation reaction. Whereas the Pt NPs already show full CO conversion at 160 °C, the catalytic activity of Au NPs seems to be inhibited by the CNx support.