One of the overriding themes in the book is that the isolation and removal from civilization in the African jungle causes Westerners to lose some of their moral senses. This is seen mainly in Kurtz, who was a harsh but normal employee of the Company until he ventured deep into the jungle. Once isolated from his own people, Kurtz found that he could do anything he wanted, and that freedom caused him to lose his morality and his rational sense. Marlow mentions this theme early on:
Land in a swamp, march through the woods, and in some inland post feel the savagery, the utter savagery, had closed round him,-- all that mysterious life of the wilderness that stirs in the forest, in the jungles, in the hearts of wild men. There's no initiation either into such mysteries. He has to live in the midst of the incomprehensible, which is also detestable.
(Conrad, Heart of Darkness, gutenberg.org)
Marlow's idea is that the wildness and darkness of the jungle removes the inhibitions that have been built up in civilization. Because men feel disconnected from their moral norms, they start to believe that they can do anything and everything, without consequences. The result of this freedom from moral scrutiny is a loss of sanity as the conditioned mind tries to reconcile its immoral acts with what it "knows" to be true. Marlow feels a certain amount of this by the end, but has not gone as far as Kurtz, and so survives with his moral sense intact, if not entirely unharmed.