Calcium oxalate (CaOx) is the most common component of kidney stones. Oxidative stress, inflammation and autophagy-induced cell death are the major causes of CaOx crystal deposition and CaOx crystal deposition can further lead to kidney injury. Trimethylamine N-oxide (TMAO), a gut microbiota-derived metabolite, plays an important role in the pathogenesis of many diseases, such as atherosclerosis, diabetes and chronic kidney disease, but the effect of TMAO on hyperoxaluria-induced CaOx crystal deposition and kidney injury remains unknown. We hypothesize that TMAO aggravates CaOx crystal deposition via promoting CaOx-mediated cell death. C57Bl/6 mice were given high-oxalate diet as a model of hyperoxaluria. TMAO was provided via drinking water. Serum TMAO levels increased 15 days after CaOx treatment (6.30 ± 0.17 μmol/L vs. 34.65 ± 8.95 μmol/L). High-oxalate diet induced inflammation, CaOx deposition and kidney injury, which TMAO aggravated. In accordance, TMAO intensified high-oxalate diet induced oxidative stress, autophagy and apoptosis. Moreover, TMAO enhanced CaOx crystal adhesion to HK-2 cells and reduced cell viability (from 88.9 ± 1.6% to 75.0 ± 2.7%). Protein kinase R-like endoplasmic reticulum kinase (PERK) may mediate these TMAO effects, as TMAO promoted PERK phosphorylation. Consistently, PERK knockdown alleviated TMAO-evoked CaOx-autophagy, apoptosis and oxidative stress in HK-2 cells. In conclusion, TMAO can aggravate hyperoxaluria-induced kidney injury by triggering the PERK/ROS pathway, which enhances autophagy, apoptosis and inflammation, and facilitates CaOx crystal deposition in renal tubular cells.