Precious-metal recovery from industrial wastewater has received considerable attention because of rapidly increasing amounts of electronic waste. Existing technologies have yet to be widely applied due to their high cost and low selectivity toward precious-metal ions. Herein, we report a direct Z-scheme tannin- TiO2 heterostructure for selective gold adsorption from electronic waste under solar irradiation. The tannin-coated TiO2 nanoparticles were prepared by a simple dipping method, and under light illumination, both tannin and TiO2 can serve as photosensitive components for the reduction of metal ions, with metal-to-ligand charge transfer from TiO2 to tannin extending the lifetime of the excited electrons. Moreover, no additional electron donors are required because the tannin layer scavenges the reactive oxygen species generated by the holes from the light-activated TiO2 surface. The heterostructure allows for the highly efficient photocatalytic recovery of gold ions, with 11 times higher adsorption capacity in the light compared to the dark. High selectivity toward gold ions was also demonstrated using a metal ion mixture including nine different metal ions that are commonly found in electronic waste. Our findings suggest that the Z-scheme heterostructure of polyphenol and semiconductor provides a promising photochemical pathway for efficient and selective metal ion recovery from electronic waste.