Atmospheric photochemistry is essential for simulating atmospheric composition, impacting air quality and climate change. However, conventional numerical schemes of photochemistry within atmospheric models are computationally expensive, leading to simplifications or omissions of critical processes in weather and climate models. Previous attempts to leverage artificial intelligence (AI) scheme to reduce computational costs have faced obstacles such as the curse of dimensionality and error propagation, and most have been limited to box models without coupling into numerical models. Here, we develop an innovative AI PhotoChemistry (AIPC) scheme coupled into an atmospheric model (WRF-Chem). With Multi-Head Self-Attention algorithm (MHSA), we simulate 74 chemical species and 229 reactions following the SAPRC-99 mechanism. This marks the first implementation of a sophisticated photochemical mechanism within one unified AI model, enabling fast, accurate, and stable simulations without needing individual AI model for each species as previous works. Comparative analysis reveals that the AIPC scheme outperforms previous AI schemes using Multi-Layer Perceptron and Residual Neural Network algorithms, offering superior accuracy and computational efficiency. Moreover, fine-tuning learning rate and broadening network width within the MHSA algorithm are more effective for improving the AIPC scheme’s performance than adjusting batch size or increasing network depth. When coupling AIPC into WRF-Chem, this hybrid model with both physics and AI schemes reproduces the spatiotemporal distributions of various species on monthly time scale, and achieves substantial speed enhancement with ~8 times faster than conventional scheme. This advancement lays the groundwork for future development of weather and climate models with sophisticated chemical processes.