Pine wilt disease caused by pine wood nematode (Bursaphelenchus xylophilus, PWN) is a severe forest disease of the genus Pinus. Masson pine as an important timber and oleoresin resource in South China, is the major species infected by pine wilt disease. However, the underlying mechanism of pine resistance is still unclear. Here, we performed a transcriptomics analysis to identify differentially expressed genes associated with resistance to PWN infection. By comparing the expression profiles of resistant and susceptible trees inoculated with PWN at 1, 15, or 30 days post-inoculation (dpi), 260, 371 and 152 differentially expressed genes (DEGs) in resistant trees and 756, 2179 and 398 DEGs in susceptible trees were obtained. Gene Ontology enrichment analysis of DEGs revealed that the most significant biological processes were “syncytium formation” in the resistant phenotype and “response to stress” and “terpenoid biosynthesis” in the susceptible phenotype at 1 and 15 dpi, respectively. Furthermore, some key DEGs with potential regulatory roles to PWN infection, including expansins, pinene synthases and reactive oxidation species (ROS)-related genes were evaluated in detail. Finally, we propose that the biosynthesis of oleoresin and capability of ROS scavenging are pivotal to the high resistance of PWN.