Being able to read and write doesn't directly help Douglass escape, but his education clearly does help him become free. How?
Douglass makes the connection between literacy and freedom in Chapter 7. In short, being able to read allows him to recognize the injustice of slavery. He is moved in particular by a book entitled The Columbian Orator, which contained, among other things, a number of anti-slavery essays. "These were choice documents to me," Douglass remembers:
I read them over and over again with unabated interest. They gave tongue to interesting thoughts of my own soul, which had frequently flashed through my mind, and died away for want of utterance. The moral which I gained from the dialogue was the power of truth over the conscience of even a slaveholder.
As he indicates in this passage, Douglass was perhaps already predisposed to be dissatisfied with slavery. He was obviously an intelligent young man not inclined to be a docile slave. But reading exposed him to a larger world in which thinking people criticized the institution on moral grounds. Douglass goes on to say that reading these documents helped him to formulate arguments against the institution himself. They also made him restlesss, just as his master had feared it would:
The more I read, the more I was led to abhor and detest my enslavers...As I read and contemplated the subject, behold! that very discontentment which Master Hugh had predicted would follow my learning to read had already come, to torment and sting my soul to unutterable anguish.
Reading, in short, does not give Douglass his liberty, but it did awaken in him a desire to be free, one that would eventually be realized. It perhaps seems a bit trite to say that reading freed the mind of a young Douglass, but it seems that he remembers his life in exactly that way. It made him angry and unwilling to passively accept his situation.