Triboelectric nanogenerator (TENG) is a type of disruptive high-entropy energy technology for the era of internet of things that drives the ubiquitous innovations of flexible/wearable electronics and sensor networks. However, developing a flexible TENG with a high sensitivity temperature response and fire warning capabilities is challenging. Here, we demonstrate a flexible, biodegradable, single electrode cellulose-based TENG with flame retardancy (FR-TENG) that is fabricated by biocompatible black phosphorus (BP) and phytic acid (PA) as flame retardants. The corresponding peak heat release rate and the total heat release rate values of FR-TENG are reduced by 64.6% and 47.6% compared with pure nanocellulose film, respectively, and the limiting oxygen index is increased to 39.1%. The FR-TENG exhibits an output of 116 V and 3.02 mA·m−2 at 2 Hz, indicating the application prospect of source for wearable electronics. An exciting feature of the FR-TENG is its resistance response to temperature with a high thermal index of 3779.16 K in the range of 35–150 ℃, which can be used as a temperature sensor to achieve quickly respond to temperature changes and fire warnings within 5 s. Therefore, the cellulose-based FR-TENG provides an idea to develop advanced multifunctional wearable electronics with potential applicability as sensors and fire alarms for firefighting and industrial applications.