the present invention provides a biomimetic polymer for stabilizing wellbore , a method for preparation of the biomimetic polymer , and a drilling fluid . the polymer contains carboxymethyl chitosan that serves as a backbone and dopamine - derived groups grafted on the backbone . the polymer provided in the present invention can improve the strength of shale in the wellbore , seal the shale pores and reduce the filter loss of drilling fluid , and thereby attains an effect of stabilizing the wellbore in shale formation in drilling process .