Aristotle said this quote

Freedom is obedience to self-formulated rules.