The first-principles approach was used to study the effect of halogen doping on the adsorption of Pb2+ on the SnS2 structure. After doping with halogen atoms, SnS2 becomes an n-type semiconductor. The adsorption energy of Pb2+ adsorbed on the surface of the F-doped SnS2 system is the smallest, the adsorption height is the shortest, and the charge transfer between Pb2+ and S is more robust. The energy band shows that the impurity energy level of the F-doped system increases, making it easier for electrons to migrate from the valence band to the conduction band. The density of states analysis shows that the interaction between the F atom and Pb2+ is more robust, which makes the change in the peak density of states more obvious. The doping of the F atom dramatically improves the stability of the system as well as the adsorption properties of the system for Pb2+.