As an adventure novel, the mood of Lord Jim cycles between excited (at the start of an adventure), anxious (when a challenge emerges), and depressing (when things go awry). There are two main cycles like this in the novel: Jim’s experience aboard the Patna at the beginning of the novel and his experience living in Patusan at the end.
Jim starts the story a “charging bull” who is excited to leave home and become a well-known hero who goes on adventures and saves people’s lives. The mood at this point is, accordingly, an enthusiastic and optimistic one. When he finds himself in danger aboard the Patna—the ship has hit an unknown object in the water and a massive storm threatens to possibly sink the ship entirely—the mood becomes panicked and fearful. On the other side of this conflict—when readers know that Jim (and the 800 passengers it was carrying) have survived—the mood does not become joyful or relieved, but actually moves into a depressing place. This is because Jim has let himself down—he did not save lives but jumped into a lifeboat and abandoned everyone on the ship. He has not only let himself down but is also publicly shamed and banned from being a sailor in the future.
The mood of the story goes through a similar cycle in the latter half of the novel: the mood is optimistic as Jim has an exciting opportunity (moving to Patusan and becoming a committed and effective leader of the people), it becomes more anxious as he navigates conflict (in the form of the violent pirate Gentleman Brown), and it shifts again into a bleak register as he fails to live up to his ideals (by not protecting Dain Waris and the others) and must face justice (this time in the form of being violently killed). These two cycles, in which the mood moves from optimistic to pessimistic, communicate that Jim must let go of his youthful dreams about being an unimpeachable hero.