so far as a man has power to think or not to think, to move or not to move, according to the preference or direction of his own mind, so far is a man FREE. Wherever any performance or forbearance are not equally in a man’s power; wherever doing or not doing will not equally FOLLOW upon the preference of his mind directing it, there he is not free, though perhaps the action may be voluntary.
 John Locke, An Essay Concerning Human Understanding (1689). copy citation

Context

“From the consideration of the extent of this power of the mind over the actions of the man, which everyone finds in himself, arise the IDEAS of LIBERTY and NECESSITY. 8. Liberty, what. All the actions that we have any idea of reducing themselves, as has been said, to these two, viz. thinking and motion; so far as a man has power to think or not to think, to move or not to move, according to the preference or direction of his own mind, so far is a man FREE. Wherever any performance or forbearance are not equally in a man’s power; wherever doing or not doing will not equally FOLLOW upon the preference of his mind directing it, there he is not free, though perhaps the action may be voluntary. So that the idea of LIBERTY is, the idea of a power in any agent to do or forbear any particular action, according to the determination or thought of the mind, whereby either of them is preferred to the other:” source