Conrad wrote Heart of Darkness in the 1890s (published in 1899) based on an experience he himself had while working as a steamboat captain on the Congo River in Africa. It is drawn from a mission that he undertook to rescue a colonial trade station agent--probably from the furthest colonial trade station, which was called Stanley Falls--which exposed him to the side of European imperialism that he writes about in Heart of Darkness.
European colonialism began in earnest in the 1800s, then in the 1880s was regulated under an agreement know as New Imperialism that resulted from a convention of European powers in Berlin in 1884-1885 under the auspices of Germany's Chancellor Bismark. Regulation was necessary because the powerful nations of Europe were overzealous to acquire land--and yet more land--as colonial trading stations in Africa and to subdue the African natives along the way.
Heart of Darkness reveals the atrocious ideas that precipitated equally atrocious actions that formed the underpinning of the New Imperialism that swept across Africa from the 1880s to the early 1900s. By the 19th century, European nations were eager to stop the slave trade but supplanted it with virtually forced labor, which was equally as strenuous as slavery, in the new exploitation of Africa's natural resources, most notably the exploitation of the ivory trade founded upon acquireing tusks of African elephants.