Multilevel phase-change memory is an attractive technology to increase storage capacity and density owing to its high-speed, scalable and non-volatile characteristics. However, the contradiction between thermal stability and operation speed is one of key factors to restrain the development of phase-change memory. Here, N doped Ge2Sb2Te5 based optoelectronic hybrid memory is proposed to simultaneously implement high thermal stability and ultrafast operation speed. The picosecond laser is adopted to write/erase information based on reversible phase transition characteristics whereas the resistance is detected to perform information readout. Results show that when N content is 27.4 at. %, N-doped Ge2Sb2Te5 film possesses high ten-year data retention temperature of 175 ℃ and low resistance drift coefficient of 0.00024 at 85 ℃, 0.00170 at 120 ℃, and 0.00249 at 150 ℃, respectively, owing to the formation of Ge-N, Sb-N and Te-N bonds. The SET/RESET operation speeds of the film reach 520 ps/13 ps. In parallel, the reversible switching cycle of corresponding device is realized with the resistance ratio of three orders of magnitude. Four-level reversible resistance states induced by various crystallization degrees are also obtained together with low resistance drift coefficients. Therefore, N doped Ge2Sb2Te5 thin film is a promising phase-change material for ultrafast multilevel optoelectronic hybrid storage.