Halide perovskite nanocrystals (NCs) with prominent optoelectronic properties have triggered substantial attention as photocatalyst, but limited by the charge recombination and instability. Here we developed stable CsPbBr3/titania microspheres (TMs) by in situ growth of CsPbBr3 NCs inside mesoporous TMs through solid-state sintering, which significantly improves the stability of perovskite NCs, making them applicable in water, achieving efficient CO2 photoreduction performance. The internal electric field facilitates the S-scheme charge transfer, enhancing the separation of electron-hole pairs, as evidenced by X-ray photoelectron spectroscopy and electron paramagnetic resonance analysis, which is pivotal for the selective photoreduction of CO2. These insights pave the way for the design of CsPbBr3-based photocatalysts with superior efficiency and stability.