To clarify the impact of biogas slurry replacing chemical fertilizers on Chinese cabbage yield and soil quality, we conducted two consecutive years of field experiment. The purified chemical fertilizer treatment was set as the control, while an equivalent nitrogen amount was added to the biogas slurry treatment (453 kg N<middle dot>hm(-2)<middle dot>a(-1)) to investigate its influence on soil nutrient indicators, heavy metals, and Chinese cabbage yield. The results indicated that compared to the chemical fertilizer treatment, the biogas slurry treatment increased soil organic matter, total nitrogen, and organic nitrogen contents by 16.4%, 35.0%, and 26.3%, respectively. The biogas slurry treatment led to decreases of Cr, Ni, Cu, Zn, As, Cd, Pb, and Hg content by 12.6%, 14.6%, 9.25%, 32.2%, 30.1%, 12.1%, 24.0%, and 61.5%, respectively. Additionally, the Chinese cabbage yield increased by 10.0% in the biogas slurry treatment group. The study suggests that biogas slurry replacing chemical fertilizers can not only increase soil fertility and Chinese cabbage yield but also contribute to the improvement of the environmental quality of soils. However, more experiments aiming to provide references for the application of the optimal dosage of biogas slurry for optimal Chinese cabbage production are needed.