I couldn't explain it in a short sentence, but I found this translation from a blog.
It seems that the blogger loves ancient Chinese literature.
He translate it to
In learning, aim at the sages; as an official, be loyal to sovereign and country.
Anyway it advocates abandoning your personal profit.