The annual decline in the quality of China's mollisols and associated nitrogen loss necessitates effective interventions. This study investigates the effects of hydrochloric acid-modified biochar (BC-H700), derived from corn straw, on nitrogen retention and microbial diversity in mollisols through pot experiments. Through 100 days of continuous study found the application of 6 % BC-H700 significantly improved soil properties, increasing pH by 18.60 %, organic matter by 1.6 %, ammonium nitrogen by 26.96 %, and nitrate nitrogen by 23.04 %. By inquiring impact of BC-H700 on microbial enzyme activities in 60-day revealing BC-H700 also enhanced the activities of key nitrogen-transforming enzymes (AMO, NOR, NOS) and functional genes (nirK, norB, nosZ) while reducing narG gene abundance and NR enzyme activity. These changes indicate that BC-H700 promotes nitrification, inhibits denitrification, enhances nitrogen retention, and reduces N2O emissions. Furthermore, BC-H700 improved microbial diversity, increasing the abundance of beneficial bacteria such as Actinobacteria, Proteobacteria, Nitrospirae, and Gemmatimonadetes. The main environmental factors affecting soil bacterial community structure were identified as organic matter, NO3-, NO2-, AMO, NOR, and NOS. Overall, BC-H700 facilitates nitrogen transformation and retention through complex interactions with soil properties and microbes. This study contributes to understanding biochar's role in soil nitrogen management and offers practical insights for improving mollisol health.