Currently, concrete structures have increasingly higher requirements for the shear capacity of beams, and ultrahigh-performance concrete (UHPC) beams are increasingly widely used. To facilitate the design of UHPC beams, this paper constructs a UHPC beam shear strength prediction model. First, static shear tests were conducted on 6 UHPC beam specimens with a length of 2 m and a cross-sectional size of 200 mm × 300 mm to explore the effects of the UHPC strength, shear span ratio, hoop ratio, and steel fiber content on the shear resistance and failure morphology of the UHPC beams. Based on the results of this study and a static load experiment of 102 UHPC beams in the literature, the construction includes the shear span ratio (λ), beam section width (b), beam section height (h), hoop ratio (ρSV), UHPC compressive strength (fc), steel fiber volume fraction (Vf), and the UHPC beam shear capacity (Vex) 7 parameter database. Based on the construction of the database, 1200 BPNN models were trained through trial and error. The models were evaluated using the correlation coefficient R, root mean square error RMSE, and a20-index indicators, and the optimal BPNN model (6-15-8-1) was determined based on the ranking of RMSE. After the optimal BPNN is optimized by a genetic algorithm, the prediction performance of the model is improved. The correlation coefficient between the predicted value and the experimental value is R2 = 0.98667, and RMSE = 7.38. This model can reliably predict the shear strength of UHPC beams and provide designers with a reference for the design of UHPC beams. Finally, after sensitivity analysis, the influence of each input parameter on the UHPC shear capacity is determined.