Antiandrogen flutamide, an antagonist of the wild-type androgen receptor (AR), is used in the clinics for treating metastatic prostate cancer. However, the T877A mutated AR is paradoxically activated by hydroxyflutamide, an active form of flutamide. Despite of crystallographic studies, how the T877A mutation results in antagonist-agonist conversion of hydroxyflutamide remains a puzzle. Here, started from a structural model of the apo form of AR ligand-binding domain (AR-LBD), we have investigated the impact of the T877A mutation on ligand-induced helix-12 positioning by replica-exchange molecular dynamics (REMD) simulations with an unique protocol, which is capable of simulating the H12 dynamics and keeping the main body of AR-LBD unchanged. Specifically, (i) we have computationally demonstrated that on the binding of hydroxyflutamide, the apo form of H12 rearranges into the agonistic form in the T877A mutant, but into the antagonistic forms in the wild-type receptor, shedding light on hydroxyflutamide agonism/antagonism; (ii) By REMD simulations, we have predicted antiandrogen SC184 is a non-agonist of the T877A mutant. This was confirmed by luciferase assays; and (iii) on the basis of the binding modes of hydroxyflutamide and SC184 from the simulations, we designed a novel flutamide derivative called SC333, which was subsequently predicted to be a pure antagonist of the T877A mutant. We then synthesized and experimentally confirmed SC333 is a pan-antiandrogen effective against the wild-type and the T877A and W741C mutated ARs, showing low micromolar cytotoxicity in LNCaP cells. Importantly, we demonstrated that distribution of the H12 conformations from REMD simulations is correlated with ligand agonist/antagonist activity.