Triboelectric nanogenerators (TENGs) can convert amorphous mechanical energy into electrical energy and solve the issue of source power for biological electronics implanted in the human body. Biomedical metal Ti was selected as the bottom plate, to fabricate a TENG with a poly-L-lactic-acid (PLLA) Ti structure. The Ti sheets were treated with a two-step anodization method, and the growth of titanium dioxide nanotube arrays (TNTAs) was controlled by variation in anodic oxidation time. The results showed that the output voltage and current of the PLLA-TNTAs biocompatible triboelectric nanogenerator (BCTENG), prepared by the two-step anodization method under 60 V for 6 h, can reach 220.6 V and 15.1 μA, respectively. The output voltage and current increased by 96.3% and 91.1%, respectively, compared with TENGs prepared without using the anode oxidation method. The choice of materials and modification of the surface morphology of the TENG components was found to be critical for increasing the triboelectrically generated surface charge. The output of the BCTENG can regulate degradation of magnesium alloys freely by using cathodic protection.