Solar conversion of CO2 into energy-rich products a sustainable solution to mitigate the global energy shortage and environmental crisis. Herein, the photocatalytic CO2 reduction of WS2-based single-atom catalysts was investigated using density functional theory. The results indicated that non-metals represented by B, C, and N doped WS2 (X-WS2) could significantly enhance the photocatalytic performance of CO2 reduction. Compare with Pt@WS2, Pt@B-WS2 could reduce the Gibbs free energy from 1.41 to 1.01 eV. The comprehensive results reveal that the introduction of the B atom endowed WS2 with improved metal-support interaction to stabilize the Pt single-atom and effectively promoted charge separation and transfer, leading to higher photocatalytic performance for converting CO2 to CH4. This study provides a strategy to design superior single-atom catalysts for photocatalytic conversion CO2 to carbon–neutral fuels.