Diabetes is a terrible health situation characterized by high-rise blood glucose levels. If it is not predicted at an early stage, then it generates the problems in the human body like kidney failure or premature death, and stroke. Controlling blood glucose levels provides patients with helpful dietary recommendations, which are critical components of diabetes management. In the past decades, diverse conventional approaches have been executed to predict the beginning stages of diabetes mellitus depending on physical and substance tests. Still, developing a new framework that can effectively diagnose diabetes mellitus-affected patients is required. To this end, the major target of this task is to predict diabetes mellitus with an advanced accuracy rate with the help of the Heuristic-based Ensemble Model Selection Strategy (H-EMSS). In the data collection phase, the Pima Indian Diabetes dataset (PID) is taken from the storage area of UCI. The data cleaning is performed in the pre-processing stage, which is the technique of removing or fixing, corrupted, incorrect, duplicate, incomplete data, or incorrectly formatted, inside a dataset. Then, the diabetes prediction is accomplished by the H-EMSS. Here, 10 base learners like Naive Bayes (NB), Convolutional Neural Network (CNN), Linear Regression (LR), Deep Neural Network (DNN), Support Vector Machine (SVM), Artificial Neural Network (ANN), Decision Tree (DT), Random Forest (RF), Auto Encoder (AE) and Recurrent Neural Network (RNN) are considered. From these, three classifiers are optimally selected by the Modified Scalar Factor-based Elephant Herding Optimization (MSF-EHO), so that the prediction rate will be high. The suggested methodology’s efficacy is also compared and analyzed, with the findings demonstrating the recommended model’s superiority. The overall evaluation is that the Root Mean Square Error (RMSE) of the designed Modified Scalar Factor-based Elephant Herding Optimization-Heuristic-based Ensemble Model Selection Strategy (MSF-EHO-H-EMSS) attains 4.601% and also the Mean Absolute Error (MAE) on the designed method achieves 0.99%. Thus, the given outcomes of the designed method revealed that it achieves elevated performance than the other existing techniques regarding diverse error metrics.