The present invention relates to the field of shale inhibitors for drilling fluids, and discloses a shale inhibitor, a method for producing the shale inhibitor, a water-based drilling fluid, and a shale gas drilling and extraction method, wherein, the shale inhibitor contains structural units A represented by formula (I), optional structural units B represented by formula (II) and structural units C represented by formula (VIII), where, n is an integer within a range of 0-3; the shale inhibitor is an amino-terminated hyperbranched polymer; the quantity ratio of the structural units A to the structural units B to the structural units C is m:(m−1):(2m+2), wherein m is an integer within a range of 1-10. With the amino-terminated hyperbranched polymer inhibitor, the shale hydration inhibiting capability can be improved, and thereby the overall inhibition performance of a drilling fluid can be improved;; 展开▼