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.