In recent times, breast mass is the most diagnostic sign for early detection of breast cancer, where the precise segmentation of masses is important to reduce the mortality rate. This research proposes a new multiobjective optimization technique for segmenting the breast masses from the mammographic image. The proposed model includes three phases such as image collection, image denoising, and segmentation. Initially, the mammographic images are collected from two benchmark datasets like Digital Database for Screening Mammography (DDSM) and Mammographic Image Analysis Society (MIAS). Next, image normalization and Contrast-Limited Adaptive Histogram Equalization (CLAHE) techniques are employed for enhancing the visual capability and contrast of the mammographic images. After image denoising, electromagnetism-like (EML) optimization technique is used for segmenting the noncancer and cancer portions from the mammogram image. The proposed EML technique includes the advantages like enhanced robustness to hold the image details and adaptive to local context. Lastly, template matching is carried out after segmentation to detect the cancer regions, and then, the effectiveness of the proposed model is analysed in light of Jaccard coefficient, dice coefficient, specificity, sensitivity, and accuracy. Hence, the proposed model averagely achieved 92.3% of sensitivity, 99.21% of specificity, and 98.68% of accuracy on DDSM dataset, and the proposed model averagely achieved 92.11% of sensitivity, 99.45% of specificity, and 98.93% of accuracy on MIAS dataset.