Fungal communities are associated with healthy peanut crops and good crop production, through the regulation of pod rot disease. Rotted peanut pods and their surrounding soil samples were collected from locations in northern China. Fungal species were identified by next-generation sequencing, using the conserved sequences of their internal transcribed spacer regions. Results showed that rotted pod samples were rich in the phyla Ascomycota and Basidiomycota, and soil samples also contained these, plus Chytridiomycota and Zygomycota. There were regional variations in the species of fungi related to peanut pod rot and its surrounding soil, between locations. Fungal species of Cryptococcus and Fusarium were less abundant in soil samples than in rotted pod samples, and were the main pathogenic fungi identified in our study. Soil total carbon, nitrogen, and potassium had a strong influence on the fungal community, and total phosphorous and calcium ions, together with soil pH, had a modest influence. Only Mycosphaerella and Gibberella were not significantly affected by these factors. These findings may be of some help to control pod rot disease and reduce the production loss of peanut crops.