The process of image segmentation is partitioning an image into its constituent parts and is a significant approach for extracting interesting features from images. Over a couple of decades, many efficient image segmentation approaches have been formulated for various applications. Still, it is a challenging and complex issue, especially for color image segmentation. To moderate this difficulty, a novel multilevel thresholding approach is proposed in this paper based on the electromagnetism optimization (EMO) technique with an energy curve, named multilevel thresholding based on EMO and energy curve (MTEMOE). To compute the optimized threshold values, Otsu's variance and Kapur's entropy are deployed as fitness functions; both values should be maximized to locate optimal threshold values. In both Kapur's and Otsu's methods, the pixels of an image are classified into different classes based on the threshold level selected on the histogram. Optimal threshold levels give higher efficiency of segmentation; the EMO technique is used to find optimal thresholds in this research. The methods based on an image's histograms do not possess the spatial contextual information for finding the optimal threshold levels. To abolish this deficiency an energy curve is used instead of the histogram and this curve can establish the spatial relationship of pixels with their neighbor pixels. To study the experimental results of the proposed scheme, several color benchmark images are considered at various threshold levels and compared with other meta-heuristic algorithms: multi-verse optimization, whale optimization algorithm, and so on. The investigational results are illustrated in terms of mean square error, peak signal-to-noise ratio, the mean value of fitness reach, feature similarity, structural similarity, variation of information, and probability rand index. The results reveal that the proposed MTEMOE approach overtops other state-of-the-art algorithms to solve engineering problems in various fields.