A brain tumor develops when abnormal cells in brain tissue multiply uncontrollably. For radiologists, finding and categorizing tumors manually has become a demanding and time-consuming task. When radiologists or other clinical professionals need to extract an infected tumor area from an MR picture, they have to go through a lengthy and laborious process. To improve performance and simplify the segmentation process, we investigate the FCM-predicted picture segmentation techniques in this study. In addition, classifiers for automating the detection and reclassification of encephalon tumors receive input consisting of critical information obtained from each segmented tissue. We have assessed, verified, and demonstrated the experimental efficacy of the proposed method. The purpose of this research was to develop a novel MFO (Moth-Flame Optimization) based LLRBFNN model for the automatic detection and classification of benign and malignant brain tumors. In order to alleviate the burden of manually detecting encephalon cancers from MR images, the suggested LLRBFNN model parameters are improved via MFO training. The Modified FCM method removes outlying nodes from the LLRBFNN model, and the MFO algorithm keeps the current of node centres in the aforementioned model. The proposed MFO-LLRBFNN model was evaluated alongside the Decision Tree and the Random Forest. To prove the reliability of this model, an MFO-based LLWNN (Local Linear Wavelet Neural Network) model for autonomously detecting brain cancers was presented. We extracted features from MR images using the MFCM (modified fuzzy C-Means) segmentation algorithm and the GLCM (Gray Level Co-occurrence Matrix) technique.