Nowadays, the comprehensive consideration of output performance, durability, and industrial environmental recycling has been the focus of triboelectric nanogenerator (TENG) research in recent years. Herein, the melamine formaldehyde (MF) foam with the feature of three-dimensional porous structure, soft contact and eco-friendly is used to design a novel three-terminal high-output TENG (TH-TENG) to efficiently harvest rotating mechanical energy based on the coupling of electrostatic induction, triboelectrification and corona discharge. The simplified sliding TENG model has been demonstrated to have excellent electrical output of 532.81 μA m−2, with the outstanding resistance to heat and humidity of the output for maintaining 95.1 % and 82.1 % under the condition of 40 ℃ and 60 % RH, 20 ℃ and 80 % RH after 100 k cycles, respectively. Furthermore, the TH-TENG achieves efficient collaborative output of DC and AC through persistent directional movement and reciprocating movement with alternant connection of electrodes, where the upper-sided and lower-sided TENGs achieve DC with power density of 3.54 and 4.97 W m−3 Hz−1, and middle-sided TENG achieves AC with power density of 0.66 W m−3 Hz−1, respectively. The TH-TENG can drive 2540 LEDs and 8 incandescent lamps, and continuously power 36 hygrothermographs in parallel for smart farm. This work has enriched charge density enhancement strategy through the industrial recyclable MF foam.