In this paper, the porous NiO/SnO2 nanofibers were synthesized via the electrospinning method along with the carbonization process. The characterization results show that the pristine SnO2-based nanofibers can form porous structure with different grain size by carbonization. The hydrogen gas-sensing investigations indicate that the NiO/SnO2 sensor exhibits more prominent sensing properties than those of pure SnO2 sensor devices. Such enhanced performance is mainly attributed to the porous nanostructure, which can provide large active adsorption sites for surface reaction. Moreover, the existence of p-n heterojunctions between NiO and SnO2 also plays a key role in enhancing gas-sensing performances. Finally, the H2 sensing mechanism based on the NiO/SnO2 nanocomposite was proposed for developing high-performance gas sensor devices.