This article presents a comprehensive investigation of the applicability of optimized machine learning (ML) models with particle swarm optimization (PSO) for forecasting the shear strength of steel fiber-reinforced self-compacting concrete (SFR-SCC) beams with/without stirrups in engineering applications. Firstly, a database containing the results of 101 specimens with nine input features is adopted to train the models. As ML models such as random forest (RF), adaptive boosting regression (AdaBoost), extreme gradient boosting (XGBoost), support vector regression (SVR), and K-nearest neighbors regression (KNN) are considered, whereas the hyper-parameters of these models are set as default by the sklearn module. On the other hand, PSO-ML models (PSO-RF, PSO-AdaBoost, PSO-XGBoost, PSO-SVR, and PSO–KNN) are constructed using particle swarm optimization to find the optimal combination of the hyper-parameters of these default ML models. Afterwards, the forecasting ability of each model is extensively assessed using various performance metrics, error analysis, and score analysis, and the model with the best forecasting ability is determined and compared with existing empirical models. Moreover, Shapley additive explanation (SHAP) analysis is also utilized to ensure the interpretability of the forecasting models and to overcome the “black box” problem of ML methods. Lastly, based on the best forecasting model developed in this study, a graphical user interface (GUI) has been developed to easily forecast the shear strength of SFR-SCC beams in practical applications. The results of the study clearly illustrate that PSO-ML models exhibit better forecasting capabilities than default models. It can be emphasized from here that the PSO algorithm can be an effective tool to improve the performance of ML models. It should also be pointed out that the use of PSO in simpler algorithms instead of tree-based models can further improve forecasting efficiency. On the other hand, the PSO-RF model has the best performance, with a lower error value and a high final score. And this makes it a more reliable option for predicting the shear strength of the SFR-SCC beams compared to empirical equations. In addition, according to the results of SHAP feature importance analysis, the most important input parameters affecting the shear strength of SFR-SCC beams are stirrup rebar ratio (ρv), stirrup yield strength (fyv) and longitudinal rebar ratio (ρt). This information can assist engineers in paying special attention to these features in their design and assessment processes.