Vegetables are crucial to a human diet as they supply the body with essential vitamins, minerals, etc. Heavy metals that accumulate in plants consequently enter the food chain and endanger people's health. Studying the spatial distribution and chemical forms of elements in plant/vegetable tissues is vital to comprehending the potential interactions between elements and detoxification mechanisms. In this study, leek plants and soil from vegetable gardens near lead–zinc mines were collected and cultivated with 500 mg L−1 PbNO3 solutions for three weeks. Micro X-ray fluorescence was used to map the distribution of Pb and other chemical elements in leek roots, and X-ray absorption near-edge spectroscopy was used to assess the Pb speciation in leek roots and leaves. These findings demonstrated that Pb, Cu, Mn, Cr, Ti and Fe were detected in the outer rings of the root's cross section, and high-intensity points were observed in the epidermis. Zn, K and Ca, on the other hand, were distributed throughout the root's cross section. Leek root and leaf contained significant quantities of lead phosphate and basic lead carbonate at more than 80%, followed by lead sulfide (19%) and lead stearate (11.1%). The capacity of leek roots to convert ambient lead into precipitated lead and fix it on the root epidermis and other inner surfaces is a key mechanism for reducing the toxic effects of Pb.