There are cases of superheroes killing villains in comics, occasionally. I recall one instance where Wonder Woman killed a villain because it was the only way to stop him. Here is an excerpt of that story from the Wikipedia article about Maxwell Lord:

Lord also uses his powers to influence Superman's mind, causing him to brutally beat Batman in the belief that he is Brainiac. Lord subsequently sends Superman to attack Wonder Woman after making him believe that she is his old enemy Doomsday trying to find Lois Lane to kill her. Lord justifies the resulting destruction as proof of his argument about the dangers of superhumans, pointing out the devastation that Wonder Woman and Superman could cause if they fought in a crowded area and with the fact that Superman can be brought under another's control as evidence that they cannot be relied upon. In the midst of her battle with Superman, Diana realizes that even if she defeats him, he would still remain under Lord's absolute mental control. She creates a diversion lasting long enough for her to race back to Lord's location and demand that he tell her how to free Superman from his control. Bound by her lasso of truth, Lord replies, "Kill me." Wonder Woman then snaps his neck (The OMAC Project, 2005). In response, Brother Eye broadcasts the footage of Wonder Woman killing Lord all over the world, destroying her reputation and her friendship with Batman and Superman who reject her despite the fact that she saved their lives.