The present invention relates to nitrogenous tricyclic compounds and uses thereof in medicine, in particular, the present invention discloses a novel nitrogenous tricyclic compound used as an FXR active regulator and a stereoisomer, a geometrical isomer, a tautomer, a N-oxide, a hydrate, a solvate, a metabolite, a pharmaceutically acceptable salt or a prodrug thereof, and use of the compound in the manufacture of a drug for treating a disease and/or disorder regulated by FXR. The present invention further discloses a pharmacetically acceptable composition containing the compound and a method of treating a disease and/or disorder mediated by FXR comprising administering the compound or pharmaceutical composition thereof disclosed herein.本發明涉及含氮三環化合物及其在藥物中的應用,具體地,本發明揭露一類新型之用作FXR活性調節劑的含氮三環化合物及其立體異構體、幾何異構體、互變異構體、氮氧化物、水合物、溶劑化物、代謝產物、藥學上可接受的鹽或前藥;以及其作為用於治療FXR介導的疾病及/或病症的藥物中的用途。本發明進一步揭露含有本發明化合物的藥物組合物和使用本發明化合物或其藥物組合物治療FXR介導的疾病及/或病症的方法。