In virtue of their fantastic sensing performance, heterojunction-based gas sensors has gained ascending attention and gradually become a new generation of high-performance gas sensors. However, due to the poor control on the element composition and distribution of heterostructure, it remains a great challenge to optimize and repeat the gas-sensing performance. In this paper, hollow p-CuO/n-ZnO nanofibers with controllable compositions were successfully synthesized by combining the electrospinning and atomic layer deposition (ALD) method, and the effect of compositions on the gas-sensing performance were systematically studied. The ratios of Zn to Cu (RZn/Cu) were well controlled by adjusting the amounts of raw materials and the deposition cycles of ALD in orthogonal experiments, which offers a good opportunity to optimize the gas sensing performances. Interestingly, with the increase of RZn/Cu, the gas responses to 100 ppm H2S at 250 °C first increased to 60.5 (RZn/Cu = 15.6) and then decreased gradually. The optimum response of these materials was improved about 6-fold versus the pure ZnO and 45-fold versus pure CuO. Meanwhile, the selectivity and stability of these H2S sensors were also got much optimized. The enhanced sensing performance is believed to be mainly attributed to the optimal ratio of p-CuO/n-ZnO and the mixed heterojunction with radial concentration gradient.