Lead-acid batteries (LAB) are one of the most harmful batteries to the environment and human health. LAB wastewater contains Pb(II) and Cd(II), meanwhile, strongly acidic media (pH ≤ 3.0) poses a serious threat to ecological safety and human health. Herein, a novel thiophene functionalized biomass-based hydrogel (PEITC-SA) containing various groups was prepared by a two-step synthesis strategy involving liquid-phase modification and dopant-induced crosslinking. The static experiments relating to selectivity, kinetics and equilibria confirmed that PEITC-SA not only had a high adsorption capacity and selectivity for Pb(II) at pH 2.0, but also had a good adaptability for both Pb(II) and Cd(II) at pH 3.0. Moreover, the coexistence of inorganic salts and organic compounds had little effect on the adsorption of Pb(II) and Cd(II). Complexation was confirmed as the main adsorption force at pH 2.0, meanwhile at pH 3.0, electrostatic interaction, ion exchange interaction and complexation were all involved. According to Density Functional Theory calculations, tetradentate coordination of thiophene and amino groups was the most stable. Dynamic column experiments towards simulated LAB wastewater demonstrated the high efficiency and feasibility of pH-regulated fractional treatment, which of unexpected economic prospects. Furthermore, PEITC-SA could be easily desorbed with dilute HCl solution. Therefore, PEITC-SA possessed satisfactory potential for the resource recovery towards LAB wastewater through pH-regulated two-step separation.