In 1890, at the age of 32, Conrad was appointed by a Belgian trading company to serve on one of its steamers. While sailing up the Congo River from one station to another, the captain became ill and Conrad assumed command. He guided the ship up the tributary Lualaba River to the trading company's innermost station, Kindu, in Eastern Kongo; Marlow, has similar experiences to the author.
When Conrad began to write the novella, eight years after returning from Africa, he drew inspiration from his travel journals. He described Heart of Darkness as "a wild story" of a journalist who becomes manager of a station in the (African) interior and makes himself worshipped by a tribe of savages. Thus described, the subject seems comic but is not. The tale was first published as a three-part serial, in February, March and April 1899, in Blackwood's Magazine (February 1899 was the magazine's 1000th issue: special edition). Later in 1902, Heart of Darkness was included in the book Youth: a Narrative, and Two Other Stories (published on 13 November 1902, by William Blackwood).
The volume consisted of Youth: a Narrative, Heart of Darkness and The End of the Tether in that order. In 1917, for future editions of the book, Conrad wrote an "Author's Note" where he, after denying any "unity of artistic purpose" underlying the collection, discusses each of the three stories and makes light commentary on the character Marlow—the narrator of the tales within the first two stories. He also mentions how Youth marks the first appearance of Marlow.
On 31 May 1902, in a letter to William Blackwood, Conrad remarked,
I call your own kind self to witness ... the last pages of Heart of Darkness where the interview of the man and the girl locks in—as it were—the whole 30000 words of narrative description into one suggestive view of a whole phase of life and makes of that story something quite on another plane than an anecdote of a man who went mad in the Centre of Africa.
There have been many proposed sources for the character of the antagonist, Kurtz. Georges-Antoine Klein, an agent who became ill and later died aboard Conrad's steamer, by scholars and literary critics as a basis for Kurtz. The principal figures involved in the disastrous "rear column" of the Emin Pasha Relief Expedition have also been identified as likely sources, including column leader Edmund Musgrave Barttelot, slave trader Tippu Tip and the expedition leader, Welsh explorer Henry Morton Stanley. Conrad's biographer Norman Sherry judged that Arthur Hodister (1847–1892), a Belgian solitary but successful trader, who spoke three Congolese languages and was venerated by the Congolese villagers among whom he worked to the point of deification, served as the main model, while later scholars have refuted this hypothesis. Adam Hochschild, in King Leopold's Ghost, believes that the Belgian soldier Léon Rom influenced the character. Peter Firchow mentions the possibility that Kurtz is a composite, modelled on various figures present in the Congo Free State at the time as well as on Conrad's imagining of what they might have had in common.