The poor stability of metal-organic frameworks (MOFs) limits their practical applications in many fields. Zeolitic imidazolate frameworks (ZIF-8) has been widely studied as an enzyme immobilization carrier. In this paper, the stability of ZIF-8-immobilized lipase in methanolysis for biodiesel production was studied. Fatty acids as conventional substances involved in lipase-mediated natural acylation were found to destroy the structure of ZIF-8 through ligand exchange mechanism. A new MOF was successfully constructed by using phthalic acid (pKa much smaller than 2-methylimidazole) as the exchange ligand. This novel MOF (abbreviated as LeZIF-8-PAX, X represents reaction hours) had dual stability in water and even in pure oleic acid. Lipase immobilized on LeZIF-8-PA0.5 showed higher specific activity. FTIR analysis showed that enzyme molecule immobilized on Le-ZIF-8-PA0.5 had higher conformational flexibility than that with ZIF-8 as the carrier. When applied to methanolysis for biodiesel production, ET 2.0/LeZIF-8-PA0.5 maintained intact morphology while ET 2.0/ZIF-8 almost lost its original morphology, with enzyme activity of 81.5% and 60.2% retained respectively after 5 batch reactions. This work is anticipated to provide new ideas for constructing stable MOFs and promoting the application of MOFs-immobilized enzymes in many chemical and pharmaceutical industrial processes.