In this study, porous polyaniline tube-like/TiO2 nano-heterostructure (PPTH) was prepared by a chemical oxidative polymerization to be used in H2 sensing. The surface morphology of polyaniline, the content of one-dimensional TiO2 nanostructures (1D TiO2), and the porosity of PPTH significantly affected the sensing performance of the samples. The response and response/recovery time of gas sensing for H2 were considered by morphological change of TiO2 at ambient conditions. The p-n contacts between polyaniline matrix and 1D TiO2 provided more active sites and facilitated the electrons transport, hence promoting the physisorption of gas molecules. R20 exhibited the highest sensitivity of 9.05 towards 2500 ppm of H2 gas at the respective response and recovery times of 94 and 374 s. The sensor designed based on F30 exhibited proper long-term stability after one year. The sensing mechanism of PPTH was also studied in detail.