The invention discloses a method for optimizing a supercritical CO2 extraction process of agilawood essential oil. The method comprises the following steps: S1, pretreatment: obtaining dry agilawood powder; S2, single-factor analysis: carrying out particle size analysis, extraction pressure analysis, extraction temperature analysis and extraction time analysis; and S3, response surface analysis: selecting the first three factors of granularity, extraction pressure, extraction temperature and extraction time contribution degree as reference factors, and taking the extraction rate of the agilawood essential oil as an evaluation index to perform response surface analysis. The contribution degree of each factor to the extraction rate of the agilawood essential oil is obtained through single factor analysis. A mathematical model is established by utilizing a response surface analysis method. Key factors and interactions thereof are selected by utilizing a response surface diagram of the model: the granularity is 30-50 meshes, the extraction temperature is 40 DEG C, the extraction pressure is 18MPa, the extraction time is 2h, the extraction rate of the agilawood essential oil reaches 0.688%, and the reliability of a result is verified by GC-MS (Gas Chromatography Mass Spectrometry), so that the method is an optimization method suitable for a supercritical CO2 fluid extraction processfor agilawood essential oil.