The shear behavior of prestressed concrete (PC) beams is a complex problem because there are many influential parameters involved. Currently, the code-based shear strength of PC beams is primarily based on empirical equations, which tend to be overconservative and are unable to generalize to different cases (e.g., beams with or without stirrups). This paper presents a framework to develop an explainable, data-driven model for the shear design of PC beams over a wide range of parameters. To this end, a comprehensive data set was assembled, consisting of 670 experiments of PC beams with and without stirrups. Different machine-learning (ML) techniques, including Random Forest, AdaBoost, and XGBoost, were evaluated to define a predictive model for the data set. Then, the most accurate model (based on XGBoost) was optimized to achieve high accuracy (with a coefficient of determination of 0.98 for the testing set). Moreover, the Shapley Additive exPlanations technique was used to explain and evaluate the importance of different parameters on the output of the predictive model. The predictive model was shown to be largely more accurate and more generalizable than current design equations and advanced finite-element analysis. In addition, reliability-based shear strength reduction factors were derived for the proposed ML model. These reduction factors allowed the application of the proposed ML model in the code-compliant shear design of PC beams.