Actually, the character you've painstakingly made into a 3D person with feelings, pet peeves, favorite pastimes, and an aversion to brussels sprouts needs to die.
Why do writers need to kill characters?
A: art imitates life, everything dies so does 'Little Nell'. One of Dickens most beloved characters had such a huge following on both sides of the Atlantic, people would wait on the wharves in New York for the ships to come from London with the next installment. What happened to 'Little Nell' Americans screamed to the Brits who'd known for 6 weeks that alas, 'Little Nell' was no more. Oh the weeping and gnashing of teeth!
B: the author needs to move on. When Arthur Conan Doyle dumped Sherlock Holmes over the falls the hue and cry of his fans forced Doyle to have the detective reappear, having foiled Moriarity once again.
C: the plot is stronger for the death of such and so. In Harry Potter book 6, 'HP & the Half-Blood Prince' JK Rowlings killed Dumbledore! Gawd, I hated that! Harry's main support, aside from his friends who have less powers than Harry, as well as being his mentor and grandfather figure is murdered. How will Harry make it through book 7, the final installment? Will JKR kill him off to the stop any fanfic that would and has come out inc. parodies and such, of the boy wizard? Killing main characters forces the remaining ones to adapt to the loss and move on.
D: Killing likable ones gives the main character the impetus to act in a way they wouldn't if that character lived or was merely lost.
E: Killing bad ones to solve the issue is cheating unless it's done with panache. Don't forget, 'the evil men do lives on after them' because they always have followers, progeny, evil wannabe's, and rabid pets. And let's not forget sequels as the chance to kill the bad guy again!