In recent years, two-dimensional (2D) and quasi-2D Ruddlesden–Popper (RP) perovskite materials have been developed as emerging semiconductor materials for solar cells due to their structural diversity and high power-conversion efficiency, but there are few reports on the photocatalytic applications. Here, 2D/quasi-2D RP BA2MAn–1PbnI3n+1 perovskite was fabricated as a hydrogen evolution photocatalyst for hydrohalic acid splitting. Theoretical and experimental surveys show that the stress in BA2MAn–1PbnI3n+1 can significantly influence the photoelectronic properties. More importantly, charge carrier dynamics investigation shows that the quasi-2D perovskite with a high n value has more efficient charge transport and separation capability, obtaining the highest photocatalytic activity. When loading with Pt as the cocatalyst, 2.0 wt % Pt/BA2MA3Pb4I13 exhibits a superior photocatalytic H2 evolution activity of 394.8 μmol h–1 with an STH (solar-to-hydrogen efficiency) of 1.21%, better than most reported 3D perovskite photocatalysts. This work is expected to provide insights into expanding metal halide perovskite-based photocatalysts for efficient photocatalytic H2 evolution.