The human ether-a-go-go-related gene (hERG) encodes a voltage-gated potassium channel that plays an essential role in the repolarization of action potentials in cardiac muscle. However, various drugs can block the ion current by binding to the hERG channel, resulting in potentially lethal cardiac arrhythmia. Accordingly, in silico studies are necessary to clarify the mechanisms of how these drugs bind to the hERG channel. Here, we used the experimental structure of the hERG channel, determined by cryo-electron microscopy, to perform docking simulations to predict the complex structures that occur between the hERG channel and structurally diverse drugs. The absolute binding free energies for the models were calculated using the MP-CAFEE method; calculated values were well correlated with experimental ones. By applying the regression equation obtained here, the affinity of a drug for the hERG channel can be accurately predicted from the calculated value of the absolute binding free energy.