Background: Precise and rapid identification of cardiac arrhythmias is paramount for delivering optimal patient care. Machine learning (ML) techniques hold significant promise for classifying arrhythmias, yet achieving peak performance often necessitates refined hyperparameter tuning. Methods: This investigation presents a novel, multi-faceted strategy for cardiac arrhythmia classification, employing a synergistic model that combines Particle Swarm Optimization (PSO) with a range of ML algorithms, i.e., Logistic Regression, Linear Discriminant Analysis, Gaussian Naive Bayes, Decision Tree, and XGBoost Classifier to enhance their predictive capabilities. The models are implemented on the UCI cardiac arrhythmia dataset and validated by Stratify K-Fold. Results: The hybrid models developed in this study exhibited a marked improvement over their unoptimized counterparts, demonstrating superior overall performance across a spectrum of metrics. Notably, Model 5, integrating PSO with the XGBoost Classifier, achieved exceptional results, including a 95.24 % accuracy, 94.81 % balanced accuracy, 96.3 % sensitivity, 93.3 % specificity, 96.3 % precision, 96.3 % F1 Score, 93.33 % NPV, 89.63 % MCC, 4.76 % CE, 14.44 LR+, 0.04 LR-, and a DOR of 364, surpassing the performance of previously reported methods. Furthermore, the models exhibited low computational cost and complexity, making them feasible for real-time applications. Conclusions: This research underscores the effectiveness of PSO-optimized hybrid models for the accurate and efficient classification of cardiac arrhythmias. The proposed approach demonstrates a significant advancement over existing methodologies in terms of diagnostic performance, presenting a valuable resource for clinical decision-making. Future studies could explore the application of these models to diverse clinical problems and investigate their interpretability to enhance trust and adoption.