This research study addresses the critical global health issue of heart disease (HD), emphasizing the importance of early detection for improving recovery outcomes. The authors have applied various machine learning (ML) algorithms, including logistic regression (LR), linear discriminant analysis (LDA), Gaussian naive bayes (GNB), support vector machine (SVM), and XGBoost (XGB) to classify the Statlog and Cleveland HD datasets. Performance metrics such as accuracy, precision, recall, F1-score, specificity, and Cohen’s kappa have been evaluated across these HD records. This study conducted two experiments: one using default ML classifiers and another with a hybrid genetic algorithm ML (GA-ML) model. The GA has been employed as a feature selector (FS), significantly enhancing the performance of each default classifier by selecting 9 out of 13 features. Notably, the GA-XGB model achieved the highest performance with an accuracy of 94.83%, precision of 93.33%, sensitivity of 96.55%, F1-score of 94.52%, specificity of 93.10%, Cohen’s kappa of 0.90, a positive likelihood ratio (LR+) of 14, a negative likelihood ratio (LR-) of 0.037, and a diagnostic odds ratio (DOR) of 378 on the combined HD dataset. These results have been validated using a 10-fold cross-validation technique. A comparative analysis has been conducted with default ML classifiers, hybrid GA-ML classifiers, and state-of-the-art methods. The results of the GA-ML models confirm the superiority of the proposed method, offering valuable insights into advancing early detection strategies and improving heart health care outcomes.