The electroencephalogram (EEG) signals are important for reflecting seizures and the diagnosis of epilepsy. In this paper, a weighted k-nearest neighbor classifier based on Bray Curtis distance (WBCKNN) is proposed to implement automatic detection of epilepsy. The Fourier transform can transform the time-domain characteristics of the signal into frequency domain, which can display more useful information. The WBCKNN classifier can well overcome the sensitivity of the neighborhood size k and has good robustness. Therefore, it can classify EEG signals more accurately for different situations. WBCKNN is applied on public dataset and tested by k-fold cross-validation. Experimental results show that the best accuracy of the two-classification problems and three-classification problems is 99.67% and 99%, respectively. Compared to other classifiers, the accuracy of classification is also improved. In addition, this method is superior to traditional methods in sensitivity, specificity and false alarm rate of epilepsy classification. This method can be applied to the medical market to help doctors diagnose epilepsy. INDEX TERMS EEG, epilepsy, Bray Curtis distance, Fourier transform, k-nearest-neighbor. ZHIPING WANG received the B.E. degree in science from Hubei Normal University, China, and the M.E. degree in maritime transportation management and the Ph.D. degree in marine engineering from