Food contamination with heavy metals accumulated in agricultural soils due to extensive fertilizer and pesticide use poses a significant threat to human health. To address this global concern, measures must be taken to evaluate the risk of heavy metal contamination of food and medicinal agricultural plants. Recently, pigeon pea (guandul, Cajanus cajan), a legume commonly found in Panamá, has been reported to grow in soils contaminated with heavy metals and absorb them. Therefore, this study aimed to assess the capacity of C. cajan plants to absorb and bioaccumulate heavy metals. C. cajan was cultivated in soils contaminated with Cd, Cr, Zn, Cu, and Mn to assess heavy metal bioaccumulation and its impact on these plants. While the initial responses were minimal, prolonged exposure revealed significant impacts, with metals such as Zn, Cr, Cu, and Mn positively influencing chlorophyll production, whereas Cd adversely affected chlorophyll synthesis and plant height and viability. C. cajan exhibited varying efficiencies in soil metal removal, notably in extracting Cr, Zn, and Mn. Translocation and bioaccumulation factors indicated the effective movement of Cu, Zn, and Mn to shoots, while Zn, Cr, and Cd primarily accumulated in the roots. These findings highlight the potential of C. cajan for phytostabilization and phytoextraction in metal‐contaminated environments. Our findings suggest that C. cajan is a viable crop for cultivation in moderately metal‐contaminated soils. Future research should optimize cultivation practices to maximize phytoremediation potential and deepen the understanding of metal uptake mechanisms in this species, processes that are crucial for sustainable agriculture and environmental management.