The invention relates to a gemfibrozil oxime derivative and its use as an FXR antagonist. The invention provides a compound shown in the formula (I) or its pharmaceutically acceptable salt and a preparation method thereof. In the formula, R1 represents hydrogen, hydroxyl, methyl, methoxyl, halogen, or a nitro group, R2 represents hydrogen, hydroxyl, methyl, trifluoromethyl or halogen, R3 represents hydrogen, hydroxyl, methyl, methoxyl, halogen or a nitro group, R4 represents hydrogen or methyl, R5 represents hydrogen or methyl, R6 represents hydrogen or methyl, and X represents NH, O or S. In addition, the compound shown in the formula (I) or its pharmaceutically acceptable salt has pharmacological effects of reducing blood fat and is a FXR antagonist.