Herein, a cobalt oxide/tungsten oxide (Co 3 O 4 /WO 3 ) p–n heterojunction for NO x detection is developed and optimized. Field‐emission scanning electron microscopy shows that the WO 3 nanorods are embellished with Co 3 O 4 nanostructure. X‐ray photoelectron spectroscopy reveals the presence of oxygen vacancy on the Co 3 O 4 coupled with WO 3 heterojunction. Compared to bare WO 3 and pure Co 3 O 4 , the Co 3 O 4 /WO 3 heterojunction sensor shows significant sensitivity to NO x at 200 °C. The sensor exhibits higher linearity from 0.4 to 10 ppm of NO x , with a sensing response of 4.4–93%. The NO x sensitivity of the Co 3 O 4 /WO 3 heterojunction sensor is ninefold higher than that of the pure WO 3 sensor. Even in a high humidity (84%) environment, the Co 3 O 4 /WO 3 heterojunction sensor demonstrates high NO x sensitivity. The sensor maintains remarkable stability measured for up to 4 weeks. The possible NO x sensing mechanism of the Co 3 O 4 /WO 3 heterojunction is additionally discussed.