Herein, alkali-activated cementitious materials (AACM) were fabricated using fly ash and blast furnace slag as raw materials, while foamed alkali-activated cementitious materials (FAACM) were prepared by a physical foaming method. They were regarded as suitable supporting carriers to load nano-TiO2 by a three-layered method and blending-foaming method to synthesize TiO2-AACM and TiO2-FAACM, respectively. The relationship between the microstructure of the alkali-activated cementitious composites with the photocatalytic activity and stability of formaldehyde degradation was revealed. The nano-TiO2 blended with AACM and FAACM exhibited good mechanical properties. Moreover, a systematic mechanism study revealed that the incorporation of nano-TiO2 did not change the hydration products of composites. There were similar forbidden bandwidths in TiO2-AACM and TiO2-FAACM compared with nano-TiO2, as nano-TiO2 was not involved in geopolymerization. The degradation efficiency of formaldehyde by TiO2-AACM and TiO2-FAACM attained 52.21 % and 55.02 %, respectively, at an initial formaldehyde concentration of 20 ppm after illumination (300 W Xe lamp) of 2 h. It was found that the excellent porous structure of FAACM promoted the adsorption efficiency of formaldehyde in the composites, which contributed to the higher photocatalytic degradation efficiency of formaldehyde. Compared with Portland cement, the CO2 emission of alkali-activated cementitious materials made from fly ash and blast furnace slag was decreased by 61.28 %. This research promotes the comprehensive utilization of solid wastes for developing the functionalized application of green materials.