The accurate identification of corn leaf diseases is crucial for preventing disease spread and improving corn yield. Plant leaf images are often affected by factors such as complex backgrounds, climate, light, and sample data imbalance. To address these issues, we propose a lightweight convolutional neural network, ICS-ResNet, based on ResNet50. This network incorporates improved spatial and channel attention modules as well as a deep separable residual structure to enhance recognition accuracy. (1) The residual connections in the ResNet network prevent gradient loss during deep network training. (2) The improved channel attention (ICA) and spatial attention (ISA) modules fully utilize semantic information from different feature layers to accurately localize key features of the network. (3) To reduce the number of parameters and lower computational costs, we replace traditional convolutional computation with a depth-separable residual structure. (4) We also employ cosine annealing to dynamically adjust the learning rate, enhancing the network’s training stability, improving model convergence, and preventing local optima. Experiments on the corn dataset in Plant Village compare the proposed ICS-ResNet with eight popular networks: CSPNet, InceptionNet_v3, EfficientNet, ShuffleNet, MobileNet, ResNet50, ResNet101 and ResNet152. The results show that the ICS-ResNet achieves an accuracy of 98.87%, which is 5.03%, 3.18%, 1.13%, 1.81%, 1.13%, 0.68%, 0.44% and 0.60% higher than the other networks, respectively. Furthermore, the number of parameters and computations are reduced by 69.21% and 54.88%, respectively, compared to the original ResNet50 network, significantly improving the efficiency of corn leaf disease classification. The study provides strong technical support for sustainable agriculture and the promotion of agricultural science and technology innovation.