We can answer this question in both a symbolic manner and a literal manner. I will try my best to lead you through both, and examining the text in these lights will be able to illuminate much in this powerful text.
In a symbolic manner, we can see education, literacy, and self awareness as Douglass' pathway to freedom. Only when Douglass understands who he is through education and matches it with the horrific nature of slavery is he able to establish the mindset of freedom. Douglass' awareness of himself allows him to begin the process of establishing a mental emancipation from the bondage of slavery. This is highlighted in his understanding that it is illegal for he, or any slave, to be taught how to read and write. When understanding the denial of a fundamental right to an education, Douglass establishes the mental paradigm of freedom. Through this, we understand that slavery is both a social condition and a psychological one. The liberation of the latter for Frederick Douglass set the stage for his path to freedom. The more literal reading allowed him to walk the pathway to freedom by borrowing the papers of a freed slave and impersonating an American serviceman in boarding the train North, and with it to freedom.