The present invention relates to 1,2,3,4-tetrahydro-9 H ‑pyrido[3,4‑b]indole TRPV1 antagonist or a pharmaceutically acceptable salt thereof, the general structural formula is as follows: In the formula, R is H, F, Cl, Br, I, CF 3 , methyl, isopropyl, tert-butyl, cyclopropyl, propenyl, ethynyl, hydroxyl, phenoxy, acetyl or phenyl; n is 1, 2 or 3; L is triazolyl, tetra Azolyl, ureido or thiourea; Ar is phenyl, pyridyl, isoquinolyl, quinolinyl or pyrimidinyl. It was found through experiments that: this type of 1,2,3,4-tetrahydro-9 H ‑pyrido[3,4‑b]indole compounds have good TRPV1 inhibitory activity, and the activity of some compounds is much higher than that of TRPV1 receptor antagonist BCTC; compared with BCTC, there is almost no side effect of elevated body temperature. Therefore the general formula 1,2,3,4-tetrahydro-9 of the present invention H ‑pyrido[3,4‑b]indole compounds and their medicinal salts are safe and effective, and have strong analgesic effect.