Heavy metal stress can lead to slow growth and dwarfing of hyperaccumulators, limiting their effectiveness in remediating soil heavy metal pollution. Nitrogen (N) and phosphorus (P) fertilization can enhance plant growth, biomass, and stress resistance. We hypothesize that N and P fertilization could improve the soil heavy metal remediation efficiency of Bidens pilosa (B. pilosa). We conducted a greenhouse experiment with four treatments: control (CK), nitrogen fertilization (NF), phosphorus fertilization (PF), and nitrogen and phosphorus fertilization (NPF). Then, we analyzed the growth status, heavy metal content, and accumulation of B. pilosa under various treatments to explore the impact of N and P fertilization on its potential to remediate soil heavy metal pollution. The shoot height, root length, and shoot biomass of B. pilosa significantly improved under NF and NPF treatments (P<0.05). The root tolerance index of B. pilosa in the NF and NPF treatments also increased, exceeding 1. The NF and NPF treatments significantly increased the accumulation of heavy metals Cd, Cu, and Pb in the shoots of B. pilosa (P<0.05). The transfer coefficient of these heavy metals also increased in the NF and NPF treatments. Accordingly, N and NP fertilization can promote the growth of B. pilosa, increase the accumulation of heavy metals Cd, Cu, and Pb in B. pilosa, and improve the remediation efficiency of these heavy metals. In the context of rising global soil heavy metal pollution, our findings indicate that B. pilosa can aid in the remediation of soil heavy metal pollution.