Insects employ different defense strategies against fungal infections and chemicals. We aimed to identify the lipid compositions of the fat body of Zophobas morio larvae before and after fungal infection with the entomopathogenic fungus Metarhizium flavoviride. We used gas chromatography-mass spectrometry to analyze lipid extracts of the fat body isolated of Z. morio 2, 5, and 7 days after fungal infection (treatment group) and compared it with the lipid extracts in a control group injected with physiological isotonic saline. In all the samples, fatty acids were the most abundant compound found in the fat body extracts, with hexadecanoic acid/C16:0 being the most abundant lipid. However, the types and concentrations of lipids changed after fungal infection, likely as an immune response. The most considerable changes occurred in the concentrations of long-chain fatty acids, i.e., hexadecanoic acid/C16:0, octadecenoic acid/C18:1, and octadecanoic acid/C18:0. Contents of methyl ester increased significantly after infection, but that of other esters, especially octanoic acid decyl ester/OADE, decreased on the 5th day after infection. To the best of our knowledge, this is the first detailed analysis of the changes in the lipid composition of the fat body of Z. morio larvae as a result of fungal infection. Our results suggest that entomopathogenic fungal infection affects the internal lipid composition of insects, potentially as a way of adjusting to such infection. These results can help understand infection processes and defense strategies of insects against fungal infection. Ultimately, they can contribute to the creation of more effective chemicals against pest insects.