With the rapid development of the Internet of Things, how to efficiently store, transmit, and process massive amounts of data has become a major challenge now. Optical neural networks based on nonvolatile phase change materials (PCMs) have become a breakthrough point due to their zero static power consumption, low thermal crosstalk, large-scale, and high efficiency. However, current photonic devices cannot meet the multilevel requirements in neuromorphic computing due to their limited storage capacity. Here, a new way for increasing storage capacity is paved from the perspective of modulation of the crystallization kinetics of PCMs. A more progressive transition from the amorphous to the crystalline states is achieved through the grain-refinement phenomenon induced by nitrogen (N) element doping in Ge 2 Sb 2 Te 5 (GST), giving precise access to more multibit states. By integrating N-doped Ge 2 Sb 2 Te 5 (N-GST) with a waveguide, a high-capacity nonvolatile photonic device enabling over 7 bits (∼222 levels) storage is achieved for the first time. The storage capacity is increased nearly by 7 times compared to the state-of-the-art device (∼32 levels). An optical convolutional neural network is successfully established for the MINIST handwritten digit recognition task by mapping synapse weight to the multiple optical levels, and a recognition accuracy of up to 96.5% is achieved. Our work provides a new strategy for the development of integrated photonic devices with multilevel and demonstrates enormous application potential in the field of large-scale photonic neural networks.