This study is undertaken to explore the relationship between the reaction products and the drying shrinkage of alkali-activated slag (AAS) with the varying hydroxide dosage. AAS pastes were firstly produced with either Al(OH)3 or Mg(OH)2 to investigate the effects of hydroxide on the composition of reaction products and the drying shrinkage of AAS. Secondly, the main reaction products formed in AAS pastes, viz. C4AH13, M4AH10, C-S-H, C-A-S-H and C-M-S-H, were synthesized individually. Synthetic products were then taken to cast the respective paste sample to examine the performance against the drying exposure. The results show that adding Mg(OH)2 indeed improved the shrinkage resistance of AAS. This is primarily connected to the increased crystalline phases, namely the hydrotalcite-like phases and the unreacted Mg(OH)2. Whereas adding Al(OH)3 did not relieve the drying shrinkage of AAS as the interlayer spacing of C-A-S-H was enlarged, which in turn allowed for more shrinkage. Further, the investigation of individual synthetic products illustrates that their drying shrinkage scales satisfied the following order: C4AH13 < M4AH10 < C-M-S-H < C-S-H < C-A-S-H. Moreover, the shrinkage scale of C-S-H was found to evolve as the Ca/Si ratio decreased.