By using NaOH and Na2SiO3 as the activator, the mechanical properties and shrinkage of the geopolymer after incorporation of 0%, 10%, 20%, and 30% epoxy resin were investigated. The mechanism of epoxy resin toughening metakaolin based geopolymer was analyzed by X-ray diffraction, scanning electron microscopy and Fourier transform infrared spectroscopy. It was shown that with the increases of epoxy resin, the shrinkage performance was obviously improved and the flexural strength increased by 53.5%. The compressive strength of EGP10, EGP20, and EGP30 increased by 49.12%, 57.04%, and 65.34% after curing for 28 days, respectively. There were five obvious vibration peaks of 811 cm−1, 1 000 cm−1, 1 050 cm−1, 1 590 cm−1, and 3 400 cm−1 in the geopolymer and the undisturbed metakaolin. More geopolymer gels were formed in the material and the microstructure was more compact.