The shrinkage of alkali-activated slag (AAS) is obviously higher than ordinary Portland cement, which limited its application in engineering. In this study, the effects of NaAlO2 in mitigating drying shrinkage and autogenous shrinkage of AAS were studied. To further understand the shrinkage mechanism, the hydration products and microstructures were studied by X-ray diffraction, scanning electron microscopy and nitrogen adsorption approaches. As the partial substitution rate of NaAlO2 for Na2SiO3 increased, the drying shrinkage and autogenous shrinkage reduced significantly. The addition of NaAlO2 could slow down the rate of hydration reaction and reduce the porosity, change the pore diameter and the composition of generated paste and cause more hydrotalcite and tetranatrolite generated—which contributed to reduced shrinkage. Additionally, raising the Na2O content rate caused obvious differences in drying shrinkage and autogenous shrinkage. As the Na2O content elevated, the drying shrinkage decreased and autogenous shrinkage increased. A high Na2O content would cause complete hydration reactions and provoke high autogenous shrinkage. However, incomplete hydration reactions left more water in the paste, and the evaporated water dramatically influenced drying shrinkage. The results indicate that addition of NaAlO2 could greatly mitigate the drying shrinkage and autogenous shrinkage of AAS.