Tsumi o nikunde hito o nikumazu (罪を憎んで人を憎まず): hate the offense, not the person. The Daijisen dictionary defines it this way. Hate and punish the offense that was committed, but do not go so far as to hate the person who committed it.
The saying is traced to the Chinese Confucian book Kusōshi (Kongcongzi). Its original wording speaks of hating the intent, not the person. In Japan, the word for intent became the word for offense.