The wellbore instability caused by shale hydration in highly reactive shale formation is a troublesome problem during the oil and gas drilling process. In this study, cationic alkyl polyglycoside (CAPG) was synthesized by the etherification of C4 APG and applied to inhibit shale hydration. Using a highly reactive shale sample, the inhibiting performance of CAPG was studied by the mud ball immersing test, linear swelling test, shale recovery test, and bentonite inhibition test. The inhibiting mechanism was studied by experiments of surface tension, contact angle, particle size, X-ray diffraction, scanning electron microscopy (SEM), and Fourier transform infrared spectroscopy. Evaluation of experimental results proved that CAPG had the best inhibition performance for highly reactive shale among the inhibitors studied in this work. Especially, CAPG has a substantially higher shale recovery ratio of 87.08%, while the shale recovery ratio of water is merely 5.41%. According to the mechanism analysis, the excellent inhibition performances of CAPG could be explained in three aspects. First, CAPG could reduce surface tension, reducing water infiltration into shale caused by capillary pressure. Second, CAPG could enter interlayer spaces of bentonite. The multipoint adsorption of CAPG on the clay surface caused by electrostatic attraction and hydrogen bonding could isolate water and neutralize negative charges on the clay surface, which is beneficial in reducing both surface hydration and osmotic hydration of clay. Third, CAPG could substantially decrease porosity of the shale surface according to SEM, reducing water invasion, which is probably because the CAPG aggregates (particle size is 248.5 nm for 1 wt % solution) plug shale pores. This paper provided an effective method to inhibit highly reactive shale.