The nitrogen-doped TiO2 with mesoporous structure, anatase/rutile homogeneous junction and surface carbon species were successfully synthesized by facile hydrolysis of tetrabutyl titanate and preheating under the sealed condition, followed by a urea-aided calcination process. Interestingly, the as-obtained carbon modified TiO2 intermediates prepared by pretreating at different temperatures showed a certain photocatalytic activity for cyclohexane oxidation, and the carbon species were deposited to the surfaces of TiO2 via the Ti-O-C bond. The microstructure and photocatalytic activity of the double nonmetal elements modified porous mixed-phase TiO2 microspheres were found to depend on the preheating conditions, and nitrogen was doped into TiO2 lattice, the co-modification of nitrogen and carbon jointly improved the light absorption capacity and reduced the band gap of TiO2. The construction of a mixed-phase junction further improved the photocatalytic performance of the co-modified TiO2 compared with pure anatase or rutile TiO2. The optimal catalyst (N-TiO2-3 b) displayed efficient and stable photocatalytic performance for three cycles. When the reaction was conducted in real outdoor circumstances, the high ketone yield (206.22 μmol) and selectivity (99.92 %) were achieved. The synthetic method was simple and cheap, thus this work showed great potential for green production of fine chemicals under moderate conditions.