Wastewater irrigation is a very important resource for heavy metal pollution in soil and then accumulation in vegetable crops. In this study, a polyethylenimine (PEI)-grafted gelatin sponge was prepared to effectively adsorb heavy metals during wastewater irrigation. Based on the strong water adsorption ability, wastewater remained in the PEI-grafted gelatin sponge for a sufficient time for the heavy metals to interact with the sorbents. The binding capacities of Pb(II) ions and Cd(II) ions on the PEI-grafted gelatin sponge were 66 mg g −1 and 65 mg g −1 , which were much more than those on the gelatin sponge (9.75 mg g −1 and 9.35 mg g −1 ). Subsequently, the PEI-grafted gelatin sponge was spread on the surface of soil planted with garlic and then sprayed with synthetic wastewater. The concentrations of cadmium and lead in the garlic leaves were 1.59 mg kg −1 and 5.69 mg kg −1 , respectively, which were much lower than those (15.78 mg kg −1 and 27.98 mg kg −1 ) without the gelatin sponge, and the removal efficiencies were 89.9% and 79.7%. The PEI-grafting gelatin sponge could effectively remove heavy metals during wastewater irrigation, which improved the soil environment and reduced human exposure to heavy metals.Water shortages in the world have led to the reuse of municipal wastewater for irrigation. In many developing countries, wastewater irrigation is a very important way in agricultural production, however, it would increase human exposure to the pollutants. Amin et al. found that vegetables grown in the Mardan District of Pakistan were highly polluted by heavy metals due to the irrigation of untreated wastewater, which would lead to serious health risks for local people 1 . Jiang et al. reported that agricultural soil was potentially at risk of heavy metal accumulation from irrigation water, which was higher than those from atmospheric deposition and fertilizer 2 . Thus, decrease the contaminants in wastewater system was an important way to avoid their entrance into agricultural soil and then food chain.Various technologies were proposed to decrease the heavy metal concentration in wastewater, such as ion exchange, adsorption, chemical precipitation and membrane separation [3][4][5][6][7] . Among them, adsorption was considered as a flexible, convenient and low cost technology. After simple desorption, the adsorbents are regenerated for multiple uses and it still has a high efficiency 4,8 . Therefore, it was a preferred process for wastewater pollution control. However, developing a specific sorbent with high adsorption capacity is an interesting yet still challenging task. Currently, carbon materials (such as carbon foam, carbon nanotubes, graphene and activated carbon) 9-11 , nanosized metal oxides (such as ferric oxides, manganese oxides and zinc oxides) 4 , chitosan composites 12-13 and low-cost adsorbents (such as zeolites and weathered coal) [14][15][16] are all considered in the literatures to be promising choices for the heavy metal pollution control. Unfortunately, it is impossible to recover t...