In this study, nitrogen-doped mesoporous titania was synthesized by templating method using chitosan. This biopolymer chitosan plays the dual role of acting as a template (which imparts mesoporosity) and precursor for nitrogen. BET-SA, XRD, UV-DRS, SEM, and FTIR were used to characterize the photocatalyst. The doping of nitrogen into TiO2 lattice and its state was substantiated and measured by XPS. The photocatalytic activity of the prepared N-doped mesoporous titania for phenol and o-chlorophenol degradation was investigated under solar and artificial radiation. The rate of photocatalytic degradation was observed to be higher for o-chlorophenol than that of phenol. The photodegradation of o-chlorophenol was 98.62% and 72.2%, while in case of phenol, degradation to the tune of 69.25% and 30.58% was achieved in solar and artificial radiation. The effect of various operating parameters, namely, catalyst loading, pH, initial concentration and the effect of coexisting ions on the rate of photocatalytic degradation were studied in detail.