The pregnane X receptor (PXR) is a key regulator of drug metabolism. Many drugs bind to and activate PXR, causing adverse drug responses. This suggests that PXR inhibitors have therapeutic value, but potent PXR inhibitors have so far been lacking. Herein, we report the structural optimization of a series of 1<i>H</i>-1,2,3-triazole-4-carboxamides compounds that led to the discovery of compound <b>85</b> as a selective and the most potent inverse agonist and antagonist of PXR, with low nanomolar IC<sub>50</sub> values for binding and cellular activity. Importantly, compound <b>89</b>, a close analog of <b>85</b>, is a selective and pure antagonist with low nanomolar IC<sub>50</sub> values for binding and cellular activity. This study has provided novel, selective, and most potent PXR inhibitors (a dual inverse agonist/antagonist and a pure antagonist) for use in basic research and future clinical studies and also shed light on how to reduce the binding affinity of a compound to PXR.