Despite his stubbornness to change and his ignorance to others, Malloy proves himself by doing what he knows is right to be a true hero. Throughout the whole film, Malloy displayed himself as a bum. He rarely works, and he is a has-been boxer. Others occasionally criticize him about his boxing career; explaining to him that he was no good. Because a lot of the criticism got to Terrys head, he was unable to associate with others.
This proves so with the relationship he has with Edie Doyle. He is barely able to hold the relationship with Edie, even though she is the one whom Terry loves so much. Up to this point, Malloy does not display himself as a hero, or even close to being one. When Malloy put himself to the test, he rarely came out successful.
This all changed when he saw the death of his brother, Charlie the Gent. Malloy decided to stand up for what he knew was right and went to speak with Johnny Friendly face to face. As the scene unfolded, the depiction of Malloy being a hero was relevant. He stood up for his brother, and his girlfriend.
He knew what the outcome would be if he confronted the hoods, yet he did what he had to do for the people on the dock, and above all, for the people he cared about the most; and for this, he gained the respect and loyalty that he deserved. As the film progressed, Malloys character seemed to have changed. He became more sensitive towards Edie, and he stuck with his wits and testified against his own former friends, the hoods. But with every good thing, there must be something bad that comes out of it. When Malloy lost the respect of his co-workers and friends by testifying against the hoods, he became a target for blame that the people of the town needed to show that they were still behind the hoods. Yet when Malloy went on the dock and professed what he truly thought of Friendly and the others, the people of the town realized that what Terry was saying is correct, and they eventually regained there respect for Terry.
What he did in that last scene proves him to be a hero. He was the only one that stood up against the hoods and he was willing to accept the consequence of his actions. All the people needed was someone they could look up to, someone to lead them one their way; that is the definition of a hero, and Terry Malloy expressed himself as one.