Onboard cable is important electrical equipment of an electric locomotive. In order to effectively evaluate the aging state of the cable, this article proposes a method to evaluate the aging state of the cable based on a new method of dielectric spectrum data processing and a new structure model of recognition algorithm. First, the log-min-max gray-scale (LMMGS) method is proposed, which transforms the dielectric parameters based on the frequency-domain dielectric spectrum (FDS) test into the gray matrix. The correlation among different dielectric parameters is retained, and the interference of their order of magnitude difference on feature extraction is reduced. Then, the new structure of spatial pyramid pooling (SPP) is improved by rectangular mesh dividing named Rectangular-SPP, which increases the number of divisible layers of the spatial pyramid, and it is used to optimize convolutional neural network (CNN), so as to remove the limitation of recognition algorithm on the size of input data and expand the scale of feature extraction. Finally, a set of methods for evaluating the aging state of onboard cable is proposed. The experimental results show that this method can effectively distinguish the insulation aging state of onboard cable. Meanwhile, the proposed Rectangular-SPP-CNN algorithm has a better performance than the conventional machine learning algorithms.