Nanostructured titanium nitride (TiN) films with varying porosity were prepared by the oblique angle deposition technique (OAD). The porosity of films increases as the deposition angle becomes larger. The film obtained at an incident angle of 85° exhibits the best catalytic activity and sensitivity to hydrogen peroxide (H2O2). This could be attributed to its largest contact area with the electrolyte. An effective approach is thus proposed to fabricate TiN nanostructure as H2O2 sensor by OAD.