Alzheimer’s disease is a degenerative neurological disorder that significantly affects patients’ cognitive functions and social lives. It is a leading form of dementia, characterized by the progressive death of brain cells. One widely adopted diagnostic approach involves magnetic resonance imaging (MRI) to evaluate brain structures. Recent advances in machine learning have enabled automated image analysis, with Convolutional Neural Networks (CNNs) commonly used for image feature extraction and classification. However, CNNs face a major limitation in maintaining consistency during image segmentation, which results in reduced classification accuracy. This issue arises from CNNs’ limited ability to preserve local pixel-level consistency during feature extraction. To address this, we propose integrating a Markov Random Field (MRF)-based layer into the CNN architecture, which has been shown to enhance segmentation consistency. This study utilizes publicly available MRI datasets of Alzheimer’s patients and employs a k-fold cross-validation scheme for evaluation. The results show that the CNN-MRF model improves classification accuracy to 63%, compared to 61% with the standard CNN. Furthermore, the loss value is reduced from 0.80 to 0.74. Although the improvement in accuracy is incremental, a paired t-test confirms that the difference is statistically significant (p < 0.05). This method has proven effective in enhancing the reliability of image-based diagnostic systems for early detection of Alzheimer’s disease.