For Sir Arthur Conan Doyle, the reason to kill Sherlock Holmes in 1893’s The Final Problem wasn’t to further the story. It was because he was starting to hate the character and wanted to be free of him. Even though he eventually caved and brought Holmes back, Doyle described the death this way:
I have been much blamed for doing that gentleman to death, but I hold that it was not murder, but justifiable homicide in self-defense, since, if I had not killed him, he would certainly have killed me.
The Many Ways George R.R. Martin, J.K. Rowling, and Other Creators Defend Killing Their Characters (via thomdunn)