Metals are the basic and key components of most of the stuff present all around us in our living environment. The corrosion of these metals is a natural phenomenon which can be avoided through application of electrochemical cathodic protection. The triboelectric nanogenerator (TENG) is used to convert the environmental energy into electric energy. Unfortunately, the current output of TENG is always lower which limits its applications in protection of metal corrosion. In this work, we report the fabrication of efficient TENG based on UIO-66, UIO-66-NO2 and UIO-66-NH2, and use it as a power supply to construct a self-powered anticorrosion system for cathodic protection on carbon steel. The introduction of nitrate (-NO2) and amine (-NH2) groups change the Fermi level of the material, allowing the TENG to transfer more electrons during the contact. It is observed that the performance of TENG based on UIO materials is fruitful, with a maximum short-circuit current as 50.0 μA and a maximum power as 122.5 μW·cm−2. In addition, dipping experiments and electrochemical measurements showed that the TENG is capable to offer notable cathodic protection to carbon steel. The demonstrated work introduces an efficient and cost-effective strategy for scavenging the mechanical energy from environment by employing the self-powered setup to effectually protect the metals from corrosion. The assembly of auspicious self-powered cathodic protection setup based on TENG offers a great potential for versatile applications in protection of metallic corrosion activities.