I missed the beginning of the film, but basically, Peter O'Toole's character falls sick and misses his ship's departure from Java. When he's well, he signs on with the first ship he can find, which is transporting many Muslims to Mecca. The ship hits a storm, most of the crew evacuates without concern for the passengers, and Jim, after initially trying to help, escapes as well. But the ship survives, and Jim is the only member of the crew who steps forward and confesses his dereliction of duty, and he's stripped of his seaman papers, and becomes a drifter.
Through a series of circumstances, Jim transports a small load of firearms and gunpowder up a river to a village of Patustan, to help a businessman named Stein keep a promise to a village chief. The chief is trying to overthrow a ruthless dictator (played by Eli Wallach), who is working with one of Stein's employees, a greedy coward played by Curt Jurgens. Wallach captures Jim, but torture reveals nothing about where the weapons went, and Jim is eventually freed by the villagers, and he helps them in their assault on Wallach's fortress. Jurgens escapes, somehow makes it back down the river, and commissions some pirates to return with him and swipe a bunch of gold from the village. They're discovered and can't make it back to their boat, but they are able to make it across the river, and "Gentleman" Duncan Brown negotiates with Jim. He offers to leave immediately with his men, if they will simply be allowed to reach their boat. Or they can fight. The chief is all for fighting, but Jim was moved by Brown's plea for forgiveness, and besides, he wants to avoid bloodshed if possible. He tells the chief that if anyone dies because of his decision to show mercy, he forfeits his life.
You can imagine how that turned out.
What's interesting is that Jim's way, even if his trust was unfounded, probably saved lives. Because Brown and his guys recognized how far away they were from reinforcements, and how outnumbered they were, they were trying to be sneaky, and only killed two people. If it had turned to open conflict, there likely would have been more deaths. The shipment Jim brought consisted of only 10 rifles, and they used all the gunpowder up in the battle against Wallach. And I'm not sure what was salvageable from the fortress. The pirates would have been overwhelmed eventually, but it's hard telling how many they would have killed first. But Jim gave his word, and let his own inner demons cloud his judgment. He knows what it's like to never be forgiven for one bad mistake, and so he's inclined to offer the chance he feels he was denied to to other. Also, I think there was a suspicion Jim was asking for leniency because they were dealing with other white men. That doesn't seem to have been the reason, but one could hardly blame the villagers for their suspicions, considering Jurgens' character was supposed to represent Stein and work with the villagers, and instead he threw in with Wallach to enslave and exploit them. Though I think Wallach, as the General, is a local warlord trying to be big.
It is not a happy film. When Jim tries to be honorable, or merciful, it backfires on him. Then he's left with regrets. People never seem to be strong enough to get past base reactions. Vengeance, guilt, greed. And ultimately, they let down anyone who relies on or cares about them. They leave, they die, they exercise poor judgment. Lord Jim isn't a bad film at all, but just isn't the sort of thing you watch if you want your mood to improve.