The goal of low-illuminance image enhancement is to increase the overall illuminance of the image, thereby presenting more useful information. Aiming at the problems of low illumination, low contrast and high noise in low-illumination images, a method of image enhancement method based on attention mechanism and Retinex algorithm is proposed. This method first decomposes the low-illumintion image into an invariant reflection map and a slowly-varying smooth illumination map. Then, it uses the attention mechanism to extract the spatial and local object information of the image, so as to ensure that the spatial and local object information is used for constraints during the enhancement process. Moreover, it increases the color loss function to improve the image saturation to compensate and calibrate the contrast details in the enhancement process. Furthermore, it improves the low-illumintion image and synthesis method, add real noise, and efficiently expands the training data set. Finally, the experiments on the LOL, and SID data sets show that the subjective and objective evaluation indicators of the proposed method improved.