This study developed a shale hydration inhibitor using a citric acid-based deep eutectic solvent (Cit-DES) and hexadecylammonium bromide (cetyltrimethylammonium bromide) to aid wellbore instability and collapse caused by drilling of shale gas wells with water-based drilling fluids. Soaking and linear expansion experiments were conducted with Na-bent and Longmaxi formation shale, respectively. The changes in illite interlayer spacing, wettability, and water absorption capacity of shale samples before and after soaking in an inhibitor solution were evaluated, which indicated that the inhibitor reduced shale hydration. The results showed that the inhibitor effectively inhibits the osmotic and surface hydration of the shale. Due to the Cit-DES hydrogen bond, the inhibitor is firmly adsorbed on the shale pore wall and inserted between clay minerals, reducing the shale surface energy, hydrophilicity, and surface potential. The swelling expansion rate of shale inhibitors is only 38.9% compared to a 3% KCl solution. The amount of shale imbibition per unit mass in distilled water is 0.011 g/g. In the inhibitor, the imbibition mass per unit of shale is 0.002 g/g, which is only 23.68% of that in distilled water. The inhibitor is environment-friendly and has a broad application prospect for maintaining shale wellbore stability and preventing wellbore collapse during horizontal shale drilling operations.