In recent years, there has been an increased interest in using image processing, computer vision, and machine learning in biological and medical imaging research. One area of this interest is the diagnosis of brain tumors, which is considered a difficult and time‐consuming task traditionally performed manually. In this study, we present a method for tumor detection from magnetic resonance images (MRI) using a well‐known graph‐based algorithm, the Boykov–Kolmogorov algorithm, and the α‐expansion method. This approach involves pre‐processing the MRIs, representing the image positions as nodes, and calculations of the weights between edges as differences in intensity. The problem is formulated as an energy minimization problem and is solved by finding the 0,1 score for the image. Post‐processing is also performed to enhance the overall segmentation. The proposed method is easy to implement and shows high accuracy, precision, and efficiency in the results. We believe that this approach will bring significant benefits to scientists and healthcare researchers in qualitative research and can be applied to various imaging modalities for future research.