Peat, as a heterogeneous mixture of decaying plant debris and microbial residues, has been widely used in many fields. However, little research focused on the impact of peat addition on food waste composting. To fill this gap, a composting experiment of food waste mixed with five varying percent peat 0, 5, 10, 15, and 20% (w/w, dry weight) was designed to investigate the effect of different dosages of peat on nitrogen conservation, physiochemical parameters, and fungal community dynamics during composting. The results showed that adding peat elevated the peak temperature of composting, lowered final pH, reduced ammonia emissions and increased the final total nitrogen content. Compared to control, adding 5, 10, 15, and 20% peat decreased ammonia emissions by 1.91, 10.79, 23.73, and 18.26%, respectively, during 42 days of composting. Moreover, peat addition increased fungal community diversity especially during maturation phase. The most two abundant phyla were Basidiomycota and Ascomycota in all treatments throughout the composting process. At the end of composting, in treatments with adding 10 and 15% peat, the richest fungi were Scedosporium spp. and Coprinopsis spp., respectively. Simultaneously, canonical correlation analyses showed that pH, moisture content, and seed germination index had significant association with fungal community composition. The study also showed that fungal community and nitrogen conservation had no direct obvious relation during composting. Overall, the results suggest that the addition of peat could efficiently enhance nitrogen conservation through reduction of ammonia emissions and 15% peat addition is the optimal formula for food waste composting.