Over the past few years, medical image processing has increased in use of deep learning algorithms, especially in the analysis of magnetic resonance (MR) scans. MRI is a crucial diagnostic tool for Alzheimer's disease (AD), a prevalent type of dementia that ranks seventh among fatal illnesses globally. As there is no known cure for Alzheimer's disease, early detection and intervention are vital to prevent its irreversible progression. This study proposes a comprehensive framework for detecting Alzheimer's disease that employs convolutional neural networks (CNNs) and deep learning approaches. We applied transfer learning to pretrained deep learning models rather than training them from scratch. Three distinct pretrained CNN models (VGG-19, ResNet-50, and Inception V3) with a fine-tuned transfer learning approach were used for five-way classification of AD. We employed the ADNI dataset, which includes MRI scans from 608 patients across five classes: Alzheimer's disease (AD), early mild cognitive impairment (EMCI), mild cognitive impairment (MCI), late mild cognitive impairment (LMCI), and normal control (NC). The models' performance was evaluated based on eight metrics: accuracy, precision, sensitivity/recall, specificity, error rate, false positive rate, F1-score, and kappa. Our findings indicate that the ResNet-50 architecture outperformed other pretrained models, achieving the highest overall accuracy of 98.7% for multiclass AD classification. Additionally, the ResNet-50 model excelled in classifying the EMCI category with an accuracy of 99.25%, indicating its effectiveness in detecting early signs of memory impairment. The proposed framework surpasses the performance of previous studies in terms of overall accuracy, sensitivity, and specificity, setting a new benchmark for five-way AD classification. The outcomes of this study will contribute significantly to early prevention efforts by enabling Alzheimer's disease to be detected before it progresses irreversibly. In conclusion, this research represents a promising approach for improving the early detection and classification of Alzheimer's disease using deep learning methods with MRI data.