An effective and environmentally friendly shale hydration inhibitor is essential to develop high‐performance water‐based drilling fluid with good environmental properties. For this purpose, and to minimize shale hydration under satisfactory environmental profit, composites of gelatin and inorganic salt (KCl) or organic salt (2, 3‐epoxypropyl‐trimethylammonium chloride, EPTAC) were prepared as environmentally friendly shale inhibitors to perfect the inhibitive effect. The inhibitive properties of the composites were evaluated by comparison with pure gelatin and common inhibitors. Results suggested that when 2.0 wt % gelatin and 1.0 wt % salt were combined, the composites reduced the swelling height of montmorillonite (Mt) to <1.70 mm, improved shale recovery to 80% at 150 °C and inhibited 16.0 wt % Mt mud‐making, thereby displaying excellent inhibition performance. Moreover, the gelatin composite with EPTAC seemed to perform better synergistic inhibition than that with KCl. The underlying inhibitive mechanisms were also investigated by measuring interlayer space through X‐ray diffraction, observing aggregation through electron microscopy, comparing hydrophobic modification degree by water contact angle measurement, and determining the zeta potential and water activity. The gelatin composites presented lower water activity and effectively prevented water from invading Mt. In these composites, gelatin mainly adsorbed on the surface of Mt particles, encapsulated Mt particles, and improved their hydrophobic property to a certain degree, whereas the salts entered the interlayer, expelled water, and decreased the interlayer space. Consequently, the combinations of gelatin and KCl or EPTAC had an excellent effect on inhibiting shale hydration. This study can also provide new insights into the design of totally environmentally friendly additives for water‐based drilling fluid. © 2019 Wiley Periodicals, Inc. J. Appl. Polym. Sci. 2019, 136, 47585.