Lord Jim is a naval officer, a career he pursues in order to fulfill his dreams of being a hero. When he believed that this ship was going to sink Jim chose to abandon it. When it didn't sink, he went to trial for desertion and ultimately lost his commission. He spends much of the novel after trying to outrun the shame he feels for his actions on the ship. In the end, he ultimately atones through sacrificing his life in the name of his friend who was killed by a pirate.