A high concentration of oxalate is associated with an increased risk of kidney calcium oxalate (CaOx) stones. Because humans lack enzymes that metabolize oxalate, the degradation of exogenous oxalate mainly depends on oxalate-degrading enzymes from the intestinal microbiome. Epidemiologic cohort studies have demonstrated that the imbalance of intestinal oxalate-degrading bacteria caused by antibiotics is closely linked to the occurrence and formation of CaOx implicated renal stones, but the mechanism of action remains poorly characterized. Here, based on clinical sample analysis, we report that the imbalance of Lactobacillus and oxalate decarboxylase (OxDC) is involved in CaOx kidney stones. Next, by analyzing the crystal structure of OxDC derived from L. farciminis, we reveal the mechanism of oxalate metabolism. Finally, through experiments in vivo and in vitro, we identify that Zn2+ can be used as an external factor to improve the activity of OxDC and protect Lactobacillus, confirming the preventive effect of Zn2+ on stones aggravated by antibiotics. Collectively, our findings illustrate the association of CaOx stones, Lactobacillus and OxDC, and provide some new recommendations for the prevention of CaOx kidney stones.