Drug-induced cardiotoxicity has become one of the major reasons leading to drug withdrawal in past decades, which is closely related to the blockade of human Ether-a-go-go-related gene (hERG) potassium channel. Developing reliable hERG predicting model and optimizing model can greatly reduce the risk faced in drug discovery. In this study, we constructed eight hERG classification models, the best of which shows desirable generalization ability on low-similarity clinical compounds, as well as advantages in perceiving activity gap caused by small structural changes. Furthermore, we developed a hERG optimizer based on fragment grow strategy and explored its usage in four cases. After reinforcement learning, our model successfully suggests same or similar compounds as chemists’ optimization. Results suggest that our model can provide reasonable optimizing direction to reduce hERG toxicity when hERG risk is corresponding to lipophilicity, basicity, the number of rotatable bonds and pi-pi interactions. Overall, we demonstrate our model as a promising tool for medicinal chemists in hERG optimization attempts.