The present invention relates to a deuterated chenodeoxycholic acid derivative and pharmaceutical composition comprising the compound thereof. Specifically, disclosed are a deuterated chenodeoxycholic acid derivative represented by formula (I) and a pharmaceutical composition comprising the compound or polymorph thereof, pharmaceutically acceptable salts, hydrates or solvates. The above compound of the present invention is used to treat and/or prevent nonalcoholic steatohepatitis, nonalcoholic fatty liver diseases, gallstones, primary biliary cirrhosis, cirrhosis, etc.