Atmospheric aerosol significantly affects the climate environment and public health, and Aerosol Optical Depth (AOD) is a fundamental optical characteristic parameter of aerosols, so it is important to develop methods for obtaining AOD. In this work, a novel AOD retrieval algorithm based on a Convolutional Neural Network (CNN) method that could provide continuous and detailed aerosol distribution is proposed. The algorithm utilizes data from Sentinel-2 and Aerosol Robotic Network (AERONET) spanning from 2016 to 2022. The CNN AOD data are consistent with the AERONET measurements, with an R2 of 0.95 and RMSE of 0.049 on the test dataset. CNN demonstrates superior performance in retrieving AOD compared with other algorithms. CNN retrieves AOD well on high reflectance surfaces, such as urban and bare soil, with RMSEs of 0.051 and 0.042, respectively. CNN efficiently retrieves AOD in different seasons, but it performs better in summer and winter than in spring and autumn. In addition, to study the relationship between image size and model retrieval performance, image datasets of 32 × 32, 64 × 64 and 128 × 128 pixels were created to train and test the CNN model. The results show that the 128-size CNN performs better because large images contain rich aerosol information.