An effective, template-free synthesis methodology has been developed for preparing mesoporous nitrogen-doped SrTiO3 (meso-STON) using glycine as both a nitrogen source and a mesopore creator. The N-doping, large surface area and developed porosity endow meso-STON with excellent activity in visible-light-responsive photodegradation of organic dyes.