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. Results reveal that after reinforcement learning, our model can provide reasonable optimizing direction to reduce hERG toxicity, especially when hERG risk is corresponding to lipophilicity, basicity and pi-pi interactions. We also prove its usage in helping chemists quickly pick out core fragments and fix on the region to be optimized. Overall, we demonstrate our model as a promising tool for medicinal chemists in hERG optimization attempts.