Brain tumor is a life-threatening disease requiring early diagnosis and treatment to improve patient outcomes. Magnetic resonance imaging (MRI) is widely used for diagnosing brain tumors, but existing MRI-based deep learning models often lack accuracy and efficiency. This work proposes a novel approach utilizing a Deep Image Recognition Generative Adversarial Network (DIR-GAN) for brain tumor detection and classification in MRI images. The methodology involves several key steps: Adaptive Bilateral Filtering (ABF) is employed to reduce noise while preserving edges, ensuring high-quality input images. Otsu-Gannet Segmentation (OGS) combines Otsu's thresholding with the Gannet Optimization Algorithm for precise segmentation of tumor regions. GrayLevel Co-occurrence Matrix (GLCM) and the Enhanced Grasshopper Optimization Algorithm (EGOA), capturing essential characteristics of the segmented images. These extracted features are then fed into the DIRGAN, which uses attention mechanisms and multi-scale feature extraction to generate synthetic MRI images and enhance classification accuracy. The DIR-GAN architecture includes a generator and a discriminator, trained simultaneously to improve feature recognition and classification capabilities. Developed in Python, the proposed models achieve accuracies of 98.86% and 98.40% on the Fig Share and MRI datasets, respectively, and 97.83% on the X-ray dataset. This innovative method offers a dependable and interpretable solution for the early diagnosis and classification of brain tumors, with the potential to enhance clinical outcomes for patients.