Fire warning sensors is crucial to effectively prevent fire accidents in a variety of modes and meet the needs of the connected age. Nevertheless, there is still a formidable challenge in fabricating self-powered fire warning sensors that are flexible and can be integrated in combustible materials. In this work, flexible high-fireproof polyimide (PI)/hydroxyapatite (HAP)/Ag2Se composite aerogel fiber (PHA-AF) was fabricated by specific wet spinning technology. The extraordinary thermoelectric effect of Ag2Se enabled PHA-AF to achieve precise temperature sensing over a wide temperature range of 100 °C–500 °C. Simultaneously, the PHA-AF-based fire alarm sensor could trigger a fire alarm system in 1.9 s and respond continuously for 14 s under flame attack, while generating output voltage of up to 5.9 mV in self-powered mode. Notably, PI as a flame-retardant material could be formed the 3D networks with HAP, as well as the skeleton support effect provided by Ag2Se nanorods enabled PHA-AF based fire alarm sensors with superior breaking tenacity (2.9 MPa), strong heat stability (maximum weight loss rate at 550 °C) and flame retardancy (LOI = 35.8 %), further highlighting its authenticity, repeatability, and reliability in fire. This work offers potential for the preparation of fiber-based self-powered early fire alarm sensors for long-term continuous using in harsh fire environment.