Traditional breast cancer detection algorithms require manual extraction of features from mammogram images and professional medical knowledge. Still, the quality of mammogram images hampers this and extracting high–quality features, which can result in very long processing times. Therefore, this paper proposes a new K–means++ clustering based on Cuckoo Search Optimization (KM++CSO) for breast cancer detection. The pre-processing method is used to improve the proposed KM++CSO method more segmentation efficiently. Furthermore, the interpretability is further enhanced using mathematical morphology and OTSU’s threshold. To this end, we tested the effectiveness of the KM++CSO methods on the mammogram image analysis society of the Mini–Mammographic Image Analysis Society (Mini–MIAS), the Digital Database for Screening Mammography (DDSM), and the Breast Cancer Digital Repository (BCDR) dataset through cross-validation. We maximize the accuracy and Jaccard index score, which is a measure that indicates the similarity between detected cancer and their corresponding reference cancer regions. The experimental results showed that the detection method obtained an accuracy of 96.42% (Mini–MIAS), 95.49% (DDSM), and 96.92% (BCDR). On overage, the KM++CSO method obtained 96.27% accuracy for three publicly available datasets. In addition, the detection results provided the 91.05% Jaccard index score.