LED solar simulators currently face limitations in their spectral simulation capabilities, especially in terms of accurately incorporating AM0G and AM1.5G solar spectra. To this end, this study introduced a framework for an LED solar spectrum simulation algorithm that considers both AM0G and AM1.5G. This study examined the principle of solar spectrum discretization and reconstruction, established a foundation for analyzing the quality of solar spectrum reconstruction, and developed a non-dominated sorting genetic algorithm II (NSGA-II)-assisted long short-term memory (LSTM)-based solar spectrum simulation strategy. This strategy integrates a multi-objective genetic algorithm to generate training datasets and a neural network for solar spectrum simulation. A dataset generation method using the NSGA-II algorithm was implemented, which leveraged the 6500 K standard blackbody spectral curve, the spectral curve offset coefficients, and the spectral distributions of various narrowband LEDs. An LSTM-based neural network for solar spectrum simulation was developed, with the RMSE serving as the evaluation function. The analysis and selection of 29 narrowband LEDs produced 5000 solar spectrum simulation training datasets. The trained LSTM model achieved spectral matching accuracies within ±10.5% and ±9.3% for AM0G and AM1.5G, respectively, meeting the A+ level simulation standard for solar spectrum reconstruction considering AM0G and AM1.5G. These findings provide a theoretical foundation and technical advancements for high-precision solar spectrum reconstruction, which has practical implications for improving the efficiency and accuracy of solar energy systems, as well as supporting further research on solar spectrum utilization, and is expected to influence the development of more efficient solar simulators.