Leptographium qinlingensis is a fungal associate of the Chinese white pine beetle (Dendroctonus armandi) and a pathogen of the Chinese white pine (Pinus armandi) that must overcome the terpenoid oleoresin defenses of host trees. L. qinlingensis responds to monoterpene flow with abundant mechanisms that include export and the use of these compounds as a carbon source. As one of the fungal cytochrome P450 proteins (CYPs), which play important roles in general metabolism, CYP51 (lanosterol 14-α demethylase) can catalyze the biosynthesis of ergosterol and is a target for antifungal drug. We have identified an L. qinlingensis CYP51F1 gene, and the phylogenetic analysis shows the highest homology with the 14-α-demethylase sequence from Grosmannia clavigera (a fungal associate of Dendroctonus ponderosae). The transcription level of CYP51F1 following treatment with terpenes and pine phloem extracts was upregulated, while using monoterpenes as the only carbon source led to the downregulation of CYP5F1 expression. The homology modeling structure of CYP51F1 is similar to the structure of the lanosterol 14-α demethylase protein of Saccharomyces cerevisiae YJM789, which has an N-terminal membrane helix 1 (MH1) and transmembrane helix 1 (TMH1). The minimal inhibitory concentrations (MIC) of terpenoid and azole fungicides (itraconazole (ITC)) and the docking of terpenoid molecules, lanosterol and ITC in the protein structure suggested that CYP51F1 may be inhibited by terpenoid molecules by competitive binding with azole fungicides.