Allopurinol, the most traditional and widely used medication for hyperuricemia and gout, has been reported as a common cause of severe cutaneous adverse reactions. Allopurinol is rapidly and extensively metabolized to oxipurinol. At least six allopurinol-related impurities have been reported to be contained in allopurinol. It is of interest to identify the compound which is likely to be responsible to the adverse reactions. Since a strong association between allopurinol-induced adverse reactions and HLA-B*58:01 has been observed, binding of allopurinol-related compounds to HLA-B*58:01 must be important for the onset of the adverse reactions. In this study, using the three-dimensional structure of HLA-B*58:01 constructed by homology modeling, the binding modes and affinities between allopurinol-related compounds and HLA-B*58:01 were simulated by docking simulations. The results have indicated that the adverse reactions of allopurinol should be due very largely to oxipurinol. The results also suggested that the concentrations of several impurities currently approved by the United States Pharmacopeia should be strictly monitored not to exceed the limits because they may strongly bind to HLA-B*58:01 and possibly leading to more severe adverse reactions.