From
《史记·留侯世家》:
忠言逆耳利于行,毒药苦口利于病 - 'Loyal advice grates on the ear but benefits conduct; bitter medicine offends the mouth but cures disease.' Zhang Liang (
张良) used this line to persuade Liu Bang to leave the Qin palace and restrain his troops. The earlier
《韩非子·外储说左上》 has a closely related formulation.