This paper deals with the properties and testing of newly prepared organic pigments based on melamine cyanurate containing magnesium or zinc cations depending on their composition and anticorrosive properties in model coatings. Organic pigments based on melamine cyanurate with Mg2+ in the form of a complex differing in the ratio of melamine and cyanurate units were prepared. Furthermore, a pigment based on melamine citrate with magnesium cation Mg2+, a pigment based on melamine citrate with magnesium cation, and a pigment based on melamine cyanurate with zinc cation were prepared. The properties of Mg-containing organic pigments were also compared with those of selected magnesium-containing inorganic oxide-type pigments. The above-synthesized pigments were characterized by inductively coupled plasma-optical emission spectroscopy, elemental analysis, scanning electron microscopy, and X-ray diffraction. In addition, the basic parameters that are indicative of the applicability of the pigments in the binders of anti-corrosion coatings were determined. The anti-corrosive properties of the tested pigments were verified after application to the epoxy-ester resin-based paint binder in three different concentrations: at pigment volume concentrations of 0.10%, 0.25%, and 0.50%. The anticorrosive effectiveness of pigmented organic coatings was verified by cyclic corrosion tests in a salt electrolyte fog (NaCl + (NH4)2SO4) in an atmosphere containing SO2 and by the electrochemical technique of linear polarization. Finally, the effect of the structure of the pigments on the mechanical resistance of the organic coatings was investigated. The results obtained showed that the new organic pigments exhibit anticorrosive properties, and at the same time, differences in performance were found depending on the structure of the pigments tested. Specifically, the results of cyclic corrosion tests and the electrochemical technique of linear polarization clearly demonstrated that synthesized pigments of the organic type based on melamine cyanurate containing magnesium or zinc cations ensure the anti-corrosion efficiency of the tested organic coatings. The highest anti-corrosion efficiency was achieved by the system pigmented with synthesized melamine cyanurate with magnesium cation (C12H16MgN18O6), whose anti-corrosion efficiency was comparable to the anti-corrosion efficiency of the tested inorganic pigment MgFe2O4, which was prepared by high-temperature solid-phase synthesis. In addition, these organic coatings achieved high mechanical resistance after being tested using the most used standardized mechanical tests.