The effect of barium ions on the biomineralization of calcium and magnesium ions is often overlooked when utilizing microbial-induced carbonate precipitation technology for removing barium, calcium, and magnesium ions from oilfield wastewater. In this study, Bacillus licheniformis was used to bio-precipitate calcium, magnesium, and barium ions. The effects of barium ions on the physiological and biochemical characteristics of bacteria, as well as the components of extracellular polymers and mineral characteristics, were also studied in systems containing coexisting barium, calcium, and magnesium ions. The results show that the increasing concentrations of barium ions decreased pH, carbonic anhydrase activity, and concentrations of bicarbonate and carbonate ions, while it increased the contents of humic acids, proteins, polysaccharides, and DNA in extracellular polymers in the systems containing all three types of ions. With increasing concentrations of barium ions, the content of magnesium within magnesium-rich calcite and the size of minerals precipitated decreased, while the full width at half maximum of magnesium-rich calcite, the content of O-C=O and N-C=O, and the diversity of protein secondary structures in the minerals increased in systems containing all three coexisting ions. Barium ions does inhibit the precipitation of calcium and magnesium ions, but the immobilized bacteria can mitigate the inhibitory effect. The precipitation ratios of calcium, magnesium, and barium ions reached 81-94%, 68-82%, and 90-97%. This research provides insights into the formation of barium-enriched carbonate minerals and offers improvements for treating oilfield wastewater.