The present invention relates to bile acid derivatives, their preparation and medical use thereof. In particular, the present invention relates to bile acid derivatives having the formula (I), their stereoisomers, or pharmaceutically acceptable salts thereof. These compounds can be used to treat FXR-mediated diseases including cardiovascular disease, atherosclerosis, arteriosclerosis, hypercholesterolemia, hyperlipidemia chronic hepatitis, chronic liver disease, gastrointestinal disease, kidney disease, heart and vascular diseases, metabolic diseases, cancer (such as colorectal cancer), neurological signs such as stroke and other diseases are expected to develop into a new generation FXR agent with a widely medical application.本發明涉及膽酸衍生物及其製備方法和醫藥用途。具體地,本發明涉及一種具有式(I)結構的膽酸衍生物、其立體異構體或其藥學上可接受鹽。該系列化合物可以用來治療用於治療FXR介導的疾病,包括心血管疾病、動脈粥樣硬化、動脈硬化、高膽甾醇血、高血脂慢性肝炎疾病、慢性肝病、胃腸疾病、腎病、心血管疾病、代謝疾病、癌症(例如結直腸癌)或神經跡象如中風等疾病,具有廣泛醫學應用,有望開發成新一代FXR激動劑。