Baruch Spinoza said this quote

Only that thing is free which exists by the necessities of its own nature, and is determined in its actions by itself alone.