The cultivated peanut (Arachis hypogaea L.), which is rich in edible oil and protein, is widely planted around the world as an oil and cash crop. However, aflatoxin contamination seriously affects the quality safety of peanuts, hindering the development of the peanut industry and threatening the health of consumers. Breeding peanut varieties with resistance to Aspergillus flavus infection is important for the control of aflatoxin contamination, and understanding the genetic basis of resistance is vital to its genetic enhancement. In this study, we reported the quantitative trait locus (QTL) mapping of resistance to A. flavus infection of a well-known resistant variety, J11. A mapping population consisting of 200 recombinant inbred lines (RILs) was constructed by crossing a susceptible variety, Zhonghua 16, with J11. Through whole-genome resequencing, a genetic linkage map was constructed with 2,802 recombination bins and an average inter-bin distance of 0.58 cM. Combined with phenotypic data of an infection index in 4 consecutive years, six novel resistant QTLs with 5.03–10.87% phenotypic variances explained (PVE) were identified on chromosomes A05, A08, B01, B03, and B10. The favorable alleles of five QTLs were from J11, while that of one QTL was from Zhonghua 16. The combination of these favorable alleles significantly improved resistance to A. flavus infection. These results could contribute greatly to the understanding of the genetic basis of A. flavus resistance and could be meaningful in the improvement of further resistance in peanuts.