Myelitis is a neurodegenerative disease positioned in the spinal cord, with multiple sclerosis (MS) being a common subtype. Radiological indicators enable the diagnosis of these diseases. This study proposes a classification framework to detect myelitis, MS, and healthy control (HC) groups using magnetic resonance imaging (MRI) images. The feature extraction step involves applying the fast Fourier transform (FFT) to MRI images. FFT is important because it converts spatial data into the frequency domain, making it easier to identify patterns and abnormalities that indicate these diseases. Then, statistical features (mean, minimum, maximum, standard deviation, skewness, kurtosis, and total energy) are extracted from this frequency information. These features are then used to train support vector machine (SVM), k-nearest neighbor (KNN), and decision tree algorithms. In multi-class classification (myelitis vs. MS vs. HC), the proposed method achieves a classification accuracy of 99.31% with SVM, with average precision, recall, and F1-score values of 99.27%, 99.21%, and 99.24%, respectively, indicating effective classification across all classes. In the binary class classification (HC vs. MS, MS vs. myelitis, HC vs. myelitis), the SVM achieves an outstanding classification accuracy of 99.36%, 99.71%, and 100% respectively. This study highlights the efficiency of FFT-based feature extraction in forming detection patterns for classifying HC, MS, and myelitis classes.