Wellbore instability caused by the hydration of shale formations during drilling is a major problem in drilling engineering. In this paper, the shale inhibition performance of polyhydroxy-alkanolamine was evaluated using an anti-swelling test, linear swelling test, wash-durable test and montmorillonite hydration and dispersion experiment. Additionally, the shale inhibition mechanism of polyhydroxy-alkanolamine was studied via Fourier transform infrared spectroscopy (FTIR), particle size, zeta potential, thermogravimetric analysis (TGA) and scanning electron microscopy (SEM). The results show that the use of polyhydroxy-alkanolamine (EGP-2) could result in a relatively lower linear swelling rate of montmorillonite, and the linear swelling rate of 0.3% EGP-2 is 26.98%, which is stronger than that of 4% KCl. The anti-swelling rate of 0.3% EGP-2 is 43.54%, and the shrinkage–swelling rate of 0.3% EGP-2 is 34.62%. The study on the inhibition mechanism revealed that EGP-2 can permeate and adsorb on the surface of montmorillonite. The rolling recovery rate of easily hydrated shale was as high as 79.36%, which greatly reduces the dispersion ability of water to easily hydrated shale. The results of this study can be used to maintain the stability of a wellbore, which is conducive to related research.