Peanut web blotch is an important leaf disease caused by Phoma arachidicola, which seriously affects the quality and yield of peanuts. However, the molecular mechanisms of peanut resistance to peanut web blotch are not well understood. In this study, a transcriptome analysis of the interaction between peanut (Arachis hypogaea) and P. arachidicola revealed that total 2989 (779 up- and 2210 down-regulated) genes were all differentially expressed in peanut leaves infected by P. arachidicola at 7, 14, 21 days post inoculation. The pathways that were strongly differentially expressed were the flavone or isoflavone biosynthesis pathways. In addition, two 2-hydroxy isoflavanone synthase genes, IFS1 and IFS2, were strongly induced by P. arachidicola infection. Overexpression of the two genes enhanced resistance to Phytophthora parasitica in Nicotiana benthamiana. Knockout of AhIFS genes in peanut reduced disease resistance to P. arachidicola. These findings demonstrated that AhIFS genes play key roles in peanut resistance to P. arachidicola infection. Promoter analysis of the two AhIFS genes showed several defense-related cis-elements distributed in the promoter region. This study improves our understanding of the molecular mechanisms behind resistance of peanut infection by P. arachidicola, and provides important information that could be used to undertake greater detailed characterization of web blotch resistance genes in peanut.