Nickel–titanium (NiTi) alloys show broad applicability in biomedical fields. However, the unexpected aggregation of bacteria and the corrosion of body fluid on NiTi-based medical devices often lead to the leakage of nickel ions, resulting in inevitable allergic and cytotoxic activities. Therefore, the capture and detection of nickel ions are important to avoid serious adverse reactions caused by NiTi-based medical devices. Herein, we presented a nickel ion capture strategy by the combination of zwitterionic hydrogels as anti-bacteria layers and carbon disulfide (CS2) components as nickel-catchers (Ni-catchers). On the one hand, the hydration layer of zwitterionic hydrogel can efficiently inhibit bacteria adhesion and reduce nickel ions leakage from NiTi corrosion. On the other hand, Ni-catchers can capture leaked nickel ions from NiTi alloy actively by chelation reaction. Therefore, this strategy shows great capabilities in resisting bacteria adhesion and capturing nickel ions, providing the potential possibility for the detection of nickel ion leakage for implantable biomedical materials and devices.