OK in the context of a soldier in war, where you swear such a thing as allegiance, I understand it.
But as a civil servant isn't that just an overblown way of saying he quit his job and left the country (neither of which is illegal in Poland I presume)?