Although ethylformate and phosphine fumigants are widely used for pest quarantine, studies related to their mechanism of action and metabolic physiological changes in Drosophila models are still unclear. In this study, we investigated how key metabolites altered by fumigants and cold treatment are associated with and affect insect physiology by comparative metabolome analysis. Fumigant treatment significantly altered cytochrome P450 and glutathione metabolites involved in the detoxification mechanism and showed lower expression of PGF2α involved in the immune response compared to the control. Additionally, most of the metabolites functioned in metabolic pathways related to the biosynthesis of amino acids, nucleotides and cofactors.