A nitrogen-containing tricyclic compound which acts as modulator of FXR, or a stereoisomer, a geometric isomer, a tautomer, an N-oxide, a hydrate, a solvate, a metabolite, a pharmaceutically acceptable salt or a prodrug thereof, and the use of the compound for the treatment of disease and/or condition mediated by FXR are described. And a pharmaceutical composition containing the compound disclosed herein and a method of treatment of disease and/or condition mediated by FXR comprising administering the compound or the pharmaceutical composition thereof are also described.本發明涉及含氮三環化合物及其在藥物中的應用,具體地,本發明揭露一類新型之用作FXR活性調節劑的含氮三環化合物及其立體異構體、幾何異構體、互變異構體、氮氧化物、水合物、溶劑化物、代謝產物、藥學上可接受的鹽或前藥以及其在製備用於治療FXR介導的疾病和/或病症的藥物中的用途。本發明進一步揭露含有本發明化合物的藥物組合物和使用本發明化合物或其藥物組合物治療FXR介導的疾病和/或病症的方法。