Lord Jim is the story of a man named Marlow's struggle to tell and to understand the life story of a man named Jim. Jim is a promising young man who goes to sea as a youth. He rises quickly through the ranks and soon becomes chief mate. Raised on popular sea literature, Jim constantly daydreams about becoming a hero, yet he has never faced any real danger. Finally, his chance comes. He is serving aboard a vessel called the Patna, carrying Muslim pilgrims to Mecca, when the ship strikes an underwater object and springs a leak. With a storm approaching, the crew abandons her and her passengers to their fate. Jim, not thinking clearly, abandons the ship with the rest of the crew. The Patna does not sink, however, and Jim, along with the rest of the officers, is subjected to an official inquiry by his fellow seamen. It is at this inquiry, where Jim is stripped of his officer's certification, that he first meets Marlow.

Seeing something in Jim that he recognizes, or perhaps fears, in himself, Marlow strikes up a tortured friendship with Jim. Jim tells him his story, and Marlow helps him obtain a series of jobs. The Patna incident haunts him, though; each time it is mentioned, Jim flees his current situation, enlisting Marlow's help once again. Finally, with the help of Stein, an expatriate trader, Marlow gets Jim situated as post manager in the remote territory of Patusan. Jim is initially captured by one of the warring factions of the area, but soon escapes and finally becomes a hero by defeating a local bandit. He falls in love with Jewel, the beautiful, half-native stepdaughter of the previous trading post manager, a bitter little man called Cornelius. Jim becomes the spiritual leader of Patusan. Its citizens place their trust in him and rely on him to enforce justice.

One day, Gentleman Brown, a pirate, shows up in Patusan with his crew in search of provisions. A skirmish ensues, and Brown holes up atop a hill. Cornelius, annoyed by Jim's success and his own failures, secretly meets with Brown and a conspiracy, including a dissenting Patusan faction, is formed against Jim. Jim, unaware of the plot, agrees to let Brown leave the area peacefully (Brown guesses at Jim's dishonorable past, and Jim decides it would be still more dishonorable to kill Brown simply because Brown knows the truth about him). Cornelius guides Brown down an alternate river channel, which leads him to the camp of Dain Waris, the son of Jim's closest ally, Doramin. Brown and his men ambush the camp, killing Dain Waris. Jim, realizing that he has still not been able to escape his initial failure aboard the Patna, ignores Jewel's pleas and goes to Doramin's compound, where the grieving father shoots and kills him.

Much of the novel is concerned with Marlow's attempts to piece together Jim's story from a variety of sources. Finally, he recounts the story to a group of acquaintances. At this point in time, though, Brown has not yet come to Patusan, and the story remains unfinished. Once events are completed, Marlow writes them down in manuscript form, which he then sends to a member of the audience of the first part of the story. The novel fragments time, and Marlow juxtaposes different, non-chronological pieces of Jim's story for maximum effect, all the while seeking to discover the source of his own fascination with Jim and the meaning behind the story.