Diabetes is currently one of the most common, dangerous, and costly diseases globally caused by increased blood sugar or a decrease in insulin in the body. Diabetes can have detrimental effects on people’s health if diagnosed late. Today, diabetes has become one of the challenges for health and government officials. Prevention is a priority, and taking care of people’s health without compromising their comfort is an essential need. In this study, the ensemble training methodology based on genetic algorithms was used to diagnose and predict the outcomes of diabetes mellitus accurately. This study uses the experimental data, actual data on Indian diabetics on the University of California website. Current developments in ICT, such as the Internet of Things, machine learning, and data mining, allow us to provide health strategies with more intelligent capabilities to accurately predict the outcomes of the disease in daily life and the hospital and prevent the progression of this disease and its many complications. The results show the high performance of the proposed method in diagnosing the disease, which has reached 98.8%, and 99% accuracy in this study.