In the story, Young Goodman Brown is corrupted because he goes to meet with the devil. This could be literal or metaphoric, real or a dream. Meeting with the devil is not necessarily bad, but Brown repeatedly attempts to turn back to his Faith. This implies that each step he takes is one more down the path of evil. But, Brown’s own walk with the devil is not really what corrupts him. When he realizes that most of the townspeople have also discoursed with the devil, he loses his faith in humanity.
The pun is on “faith,” since she represents goodness in this story. Brown feels guilty for leaving “Faith” in the first place. His corruption becomes complete when he cannot believe that goodness exists in a world where everyone he knows has taken part in some evil. For Brown, everyone looks like hypocrites. And he would be correct. But Brown’s stubborn or absolutist religious views (Puritan) make it difficult for him to accept that the duality of good/evil is a part of human nature.
Brown concludes that if this is a world of evil, he will be evil himself.
In truth, all through the haunted forest there could be nothing more frightful than the figure of Goodman Brown.
Brown has lost faith in the world, himself and his wife.
“My faith is gone!” cried he after one stupefied moment. “There is no good on earth; and sin is but a name. Come, devil; for to thee is this world given.”