Diabetic retinopathy (DR) is a common eye disease that results in vision loss by damaging the blood vessels. Diabetic patients are at high risk of developing DR owing to the damage of retinal lesions, thereby causing clots, injuries and bleeding. The disease leads to abnormal changes in the structure of the retina. Therefore, the timely detection and early treatment of eye diseases are essential for preventing people from vision loss. Ophthalmologists distinguish DR based on features such as exudes, microaneurysms, blood vessel area, hemorrhages, etc. An artificial intelligence (AI) method is proposed by ensembling a deep learning (DL) model with the explainable AI based Shapley additive (SHAP) method for DR image segmentation and classification. The proposed model uses fundus images to detect abnormalities in the eye. First, the DR images are collected from the Asia Pacific Tele-Ophthalmology Society 2019 blindness detection (APTOS 2019) dataset. Data augmentation is performed to artificially increase the size of a training dataset by generating new data samples from existing ones by rescaling, flipping, rotating, zooming, etc. In order to improve the quality and enhance specific features, pre-processing is performed. The pre-processed images are segmented using the improved U-Net model, where the severity of the disease gets predicted, and the fundus images are segmented using the trained model to attain precise abstraction of retinal blood vessels. Finally, the proposed study used the Shapley Additive Ensembled DenseNet-121 ResNet-50 (SAE-DR) model to detect DR disease based on the features. To improve the readability of the deep learning model, an explainable AI based Shapley additive method is proposed. Then, compare the results of the proposed model with existing state-of-the-art methods. The simulation results prove that the proposed model achieves superior detection performance with an accuracy of 98.69%, sensistivity of 86.23%, specificity of 97.54%, F-score of 90.26%, precision of 94.26% and processing time of 0.153 s.