Many working-age people suffer from diabetic retinopathy (DR), one of the chronic retinal conditions caused by diabetes that eventually results in blindness. The classification of the DR severity level has been an arduous task due to the complexity of the lesion features. An efficient detection technique is needed for the screening procedure to categorize the retina's subtle pathologies. Deep neural networks are essential for identifying eye diseases and enabling ophthalmologists to treat patients immediately. To categorize the severity of DR utilizing images from the general IDRiD, MESSIDOR, and KAGGLE datasets, our research provides an effective hybrid optimized deep-learning network (HODLNet) model. The quality of the input fundus image is enhanced by performing preprocessing initially with noise removal and contrast enhancement. After that, to segment the blood vessels and optic disc, a modified ResUNet model is used. The features are then extracted after the lesion region has been found using the Gabor filter banks. An improved ShuffleNet v2 is used for the final classification process. According to the experimental results, the proposed HODLNet model produces higher results with a 99.84% accuracy for multiclass classification than the existing deep-learning models for MESSIDOR, IDRiD, and KAGGLE datasets.