The support vector machine (SVM) does not have a fixed parameter selection method and the manual selection of parameters is difficult to determine the validity, which affects the accuracy of recognition. simultaneously, The existing coarse-grained approach cannot effectively analyze the high-frequency components of time series. In view of the shortcomings of the above method, we put forward a new technique of rolling bearings for fault detection, which combines wavelet packet dispersion entropy (WPDE) and artificial fish swarm algorithm (AFSA) optimize support vector machines (AFSA-SVM). First of all, wavelet packet is devoted to decompose the original vibration signal into components of different frequency bands. Secondly, the dispersion entropy (DE) are calculated for each of the obtained frequency band components to acquire more comprehensive and complete fault information. Afterward, Input feature samples into the SVM model for training, and AFSA is used to optimize the parameters of SVM to obtain the optimal value so as to establish the best classification model. Finally, the prepared test set is input into AFSA-SVM for fault classification. The achievement of bearing detection experiments show that this approach can accurately and quickly identify fault types.