Decreasing the mass transfer resistance is a promising technique to prepare an efficient catalyst for improving biomass macromolecules conversion in biodiesel production. In this study, hierarchical core–shell composite nanocatalysts were prepared through a solvothermal technique using zeolitic imidazolate framework-8 (ZIF-8) and ZIF-11 metal–organic frameworks (MOFs). The nanocatalysts were characterized by XRD, FT-IR, BET, FE-SEM, EDS, XPS, TEM, NH3-TPD, and CO2-TPD analyses. The results showed high crystallinity, high surface area (1446.86 m2/g), high pore volume (0.65 cm3 g−1), and mesoscale pore size (2.37 nm). Furthermore, TEM images confirmed the formation of core–shell structure for the composites. The catalytic activity was evaluated in the transesterification of sunflower oil at different operating conditions. The highest biodiesel yield (96.4 %) and full free fatty acid (FFA) conversion were obtained over the ZIF-11@ZIF-8 nanocatalyst at the optimum operating conditions: 120 °C, catalyst concentration of 8 wt%, methanol to oil ratio of 40:1, and 10 h. The ZIF-11@ZIF-8 nanocatalyst showed high thermal and chemical stability after several sequence cycles, leading to high reusability.