Brain tumor is one of the most aggressive forms of cancer. In 2015, approximately 23,000 people were diagnosed with brain tumors according to cancer statistics in the United States. Radiologists utilize medical imaging techniques to manually detect tumors. However, the process of tumor classification takes a very long time and is based on the expertise and capability of radiologists. As the number of patients increases, the volume of data requiring daily analysis also grows significantly, causing visually interpreted readings expensive and prone to inaccuracies. Convolutional Neural Network (CNN) is the most popular method as a CAD system based on medical images. This research focuses on utilizing the CNN method, optimized by the cuckoo search algorithm, to predict brain tumors based on a dataset of 1050 T1-weighted contrast-enhanced MRI images in MATLAB data format. This research achieved the best results with an average accuracy of 0.926 for the test data.