The opening event in Lord Jim may have been based in part on an actual abandonment of a ship. On 17 July 1880, S.S. Jeddah sailed from Singapore bound for Penang and Jeddah, with 778 men, 147 women and 67 children on board. The passengers were Muslims from the Malay states, travelling to Mecca for the hajj (holy pilgrimage). Jeddah sailed under the British flag and was crewed largely by British officers. After rough weather conditions, the Jeddah began taking on water. The hull sprang a large leak, the water rose rapidly, and the captain and officers abandoned the heavily listing ship. They were picked up by another vessel and taken to Aden where they told a story of violent passengers and a foundering ship. The pilgrims were left to their fate, and apparently certain death. However, on 8 August 1880 a French steamship towed Jeddah into Aden – the pilgrims had survived. An official inquiry followed, as it does in the novel.
The inspiration for the character of Jim was the chief mate of the Jeddah, "Austin" Podmore Williams, whose grave was tracked down to Singapore's Bidadari Cemetery by Gavin Young in his book, In Search of Conrad. As in the novel, Williams created a new life for himself, returning to Singapore and becoming a successful ship's chandler.
Conrad may also have been influenced by the naturalist Alfred Russel Wallace's 1869 account of his travels and of the native peoples of the islands of Southeast Asia, The Malay Archipelago; the character Stein is based on Wallace. The second part of the novel is based in some part on the life of James Brooke, the first Rajah of Sarawak. Brooke was an Indian-born English adventurer who in the 1840s managed to gain power and set up an independent state in Sarawak, on the island of Borneo. Some critics, however, think that the fictional Patusan was intended not to be part of Borneo but of Sumatra.