The discovery of cyanobacteria fossils in microbialite prompts the investigation of carbonate biomineralization using cyanobacteria. However, the impact of coexisting magnesium and iron in microbialite on carbonate biomineralization has been overlooked. Here, Synechocystis sp. PCC 6803 was used to induce calcium carbonate in the presence of coexisting magnesium and ferric ions. The findings demonstrate that cell concentration, pH, carbonic anhydrase activity, and carbonate and bicarbonate concentrations decreased with increasing concentrations of magnesium and calcium ions. Ferric ions yielded a contrasting effect. The levels of deoxyribonucleic acid, protein, polysaccharides, and humic substances in extracellular polymeric substances increased in the presence of separated or coexisting calcium, magnesium, and ferric ions. Magnesium ions inhibited calcium ion precipitation, whereas ferric ions exhibited the opposite effect. Protein secondary structures became more abundant and O-C=O and N-C=O contents increased with increasing ion concentrations by Fourier transform infrared spectroscopy and X-ray photoelectron spectroscopy analyses. Scanning electron microscopy revealed that ferric ions lead to rougher surfaces and incomplete rhombohedral structures of calcite, whereas magnesium ions promoted greater diversity in morphology. Magnesium ions enhanced the incorporation of ferric ions. This work aims to further understand the effect of magnesium and ferric ions on calcium carbonate biomineralization induced by cyanobacteria.