This study presents a new nanoporous TiO2/SnO2 heterojunction for NOx gas detection by using a two-step sol–gel process. The unique TiO2 and SnO2 nanoheterojunction matrix right on the film surface enables the TiO2 photocatalyst to absorb minimal UV power (3 μW/cm2) and effectively transfer electrons to the SnO2 conduction band. The sensor detects NO and NO2 gases down to 4 ppb (response of 0.6%) and 10 ppb (response of 1.3%) at 1 V at room temperature. It also exhibits a fast recovery time (100 ± 40 s at 500 ppb NOx), an improved response over a wide relative humidity range (10–60%), and a long lifetime over 30 days. The ultralow UV power required can be easily harvested from sunlight, eliminating the need for UV LEDs. XPS and SEM analyses indicated that the unique nanoporous TiO2/SnO2 structure improves sensing performance, with oxygen vacancies playing a critical role in the NOx gas sensing mechanism. This work demonstrated the highly efficient UV catalyst effect in sensors with the surface heterojunction matrix. The low-power ppb-level NOx detection is suitable for environmental monitoring and respiratory disease detection.