From
范仲淹 岳阳楼记 (Fan Zhongyan, Record of Yueyang Tower, 1046, Northern Song). Full passage:
居庙堂之高,
则忧其民;
处江湖之远,
则忧其君 (When high in the imperial court, I worry for the people; when far on the rivers and lakes, I worry for the ruler). One of the defining statements of Confucian official ethics.