Phytoremediation of heavy metals (HMs) is an efficient methodology to remove toxic metals from the soil. On the other hand, arbuscular mycorrhizal fungi (AMF) are utilized as biological fertilizers as they improve root expansion, nutrient uptake, shoot growth, and plant biological performance. In this study, the effect of AMF inoculation on the morphological traits, macro- and micronutrient contents, essential oil content (EOC), and essential oil yield (EOY) of lavender (Lavandula angustifolia L.) was investigated, under HM (Pb and Ni) stress in greenhouse conditions. The performed treatments were as follows: AMF (Funneliformis mosseae) inoculation (5 g kg−1 soil), and HM stress, including Pb (150 and 225 mg kg−1 soil from Pb(NO3)2) and Ni (220 and 330 mg kg−1 soil from Ni(NO3)2). The controls were the absence of AMF and HM treatments. The results showed that the contamination with Pb and Ni decreased plant height, branch number, fresh and dry weights of shoots and roots, and P, K, Mg, Fe, Zn, and Mn contents. At the same time, AMF inoculation modulated the adverse effects of Pb and Ni treatments. AMF inoculation and lower concentrations of Pb and Ni increased the EOC and EOY of lavender plants, whereas the higher levels of HMs reduced the morphobiometric traits. AMF inoculation increased the Pb and Ni contents in roots. The treatment with Pb at 220 mg kg−1 led to a higher stress effect than that of Ni treatment. In conclusion, the results recommend AMF inoculation as a helpful procedure to improve the growth responses and EOY of lavender in environments polluted with the tested HMs and suggest that AMF inoculation is potentially efficient in mitigating HM stress effects.