The invention relates to preparation methods of sulphonylaminocarbonyl derivatives and compositions containing the same component and a use of the sulphonylaminocarbonyl derivatives as FXR and/or TGR5 agonists; the agonists are the sulphonylaminocarbonyl derivatives represented by the formula I, or pharmaceutically acceptable salts, prodrugs, solvates, hydrates, polymorphs, isomers, and stable isotope derivatives thereof. The compounds can be used for treatment of diseases and symptoms mediated by FXR and/or TGR5 and other therapeutic fields, wherein the diseases and symptoms include primary biliary cirrhosis, nonalcoholic fatty liver, portal hypertension, bile acid diarrhea and cholestasis, type II diabetes and obesity.