ZnIn2S4 has been extensively studied in the field of photocatalytic hydrogen evolution (PHE), but its bulky structure often results in high charge carrier recombination and low light harvesting capability. Herein, efficient hierarchical MGa2O4/ZnIn2S4 (M = Ni, Co) hollow nanofiber photocatalysts with p-n heterojunction were fabricated by an electrospinning-solvothermal method. The hierarchical structure of MGa2O4/ZnIn2S4 composites has facilitated p-n heterojunction formation, promoted the charge separation efficiency, enhanced light harvesting capability, and provided abundant reactive sites. The synergistic effects of MGa2O4 and ZnIn2S4 accelerated the PHE rate by reducing the *H reaction intermediates energy barrier. Under simulated solar light, the NiGa2O4/ZnIn2S4 and CoGa2O4/ZnIn2S4 with optimal proportions delivered outstanding PHE rate of 9292 and 6283 µmol·g−1·h−1, which was 5 and 3 times higher than that of pure ZnIn2S4, respectively. This work opens up an efficient electrospinning-mediated solvothermal strategy for constructing hierarchical ZnIn2S4-based nanofiber composites with excellent PHE performance.