Most exiting piezoelectric polymers have low glass transition temperature, so they can only opereture at lower temperature (<150 °C). Once the operate temperature is exceeded, the piezoelectric performance of the device rapidly decreases. At higher temperatures, dense chain motion can interfere with the orientation of dipoles, thus limiting the development of polmer based high-temperature piezoelectric sensors. High-temperature piezoelectric sensor devices are entirely made of inorganic materials, however, inorganic materials are rigid and can only under small strains. Therefore, the enhancement the temperature resistance of piezoelectric polmers and constructing piezoelectric asymmetric structure are the key to the manufacturing of flexible high-temperature resistant piezoelectric/pyroelectric dual functional sensors. In this study, polyacrylonitrile (PAN) nanofiber film was prepared by electrospinning, then heat treating PAN nanofiber film by program temperature control. The effects of the different heat-treatment temperatures on the mechanical and electrical performance of PAN nanofiber film are studied systematically. The results of the study show that, PAN high temperature resistant flexible nanofiber film sensors can be used in high temperature environment (> 500 ℃). Its output performance increases with the increase of heat treatment temperature (< 260 ℃) and then basically remains unchanged (260-450 ℃). Finally, the output performance decreased (> 450 ℃). When the heat treatment temperature reaches 260 ℃, the output voltage was up to 10.08 V, and current reached 2.89 μA. Compared to the PAN membranes without heat treatment, its output voltage and current were increased by 3.54 times and 2.83 times, respectively. At the same time, the output of the PAN high temperature resistant flexible nanofiber film sensors almost unchanged in the high-temperature environment. For the first time, the heat-treated PAN nanofiber film has a pyroelectric effect, and the pyroelectric output open-circuit voltage and short-circuit current increase with the increasing of the temperature gradient. Besides, the PAN nanofiber film sensors have durability for over 5000 cycles under room temperature(25 °C), and it also has durability for over 5000 cycles under high temperature (400 °C). Overall, good flexible, high-temperature resistance, and bifunctional sensing ability make PAN flexible nanofiber film sensors expect to be widely used in high temperature environments such as fire safety, aerospace and other harsh environment.