Carbon nitrides integrating macroheterocycles offer unique potential as hosts for stabilizing metal atoms due to their rich electronic structure. To date, only graphitic heptazine-based polymers have been studied. Here, we demonstrate that palladium atoms can be effectively isolated on other carbon nitride scaffolds including linear melem oligomers and poly(triazine/heptazine imides). Increased metal uptake was linked to the larger cavity size and the presence of chloride ions in the polyimide structures. Changing the host structure leads to significant variation in the average oxidation state of the metal, which can be tuned by exchange of the ionic species as evidenced by X-ray photoelectron spectroscopy and supported by density functional theory. Evaluation in the semi-hydrogenation of 2-methyl-3-butyn-2-ol reveals an inverse correlation between the activity and the degree of oxidation of palladium, with oligomers exhibiting the highest activity. These findings provide new mechanistic insights into the influence of the carbon nitride structure on metal stabilization.