If your game leans towards dark subject matter with the express intent of being dark, then killing a main character is certainly a way to go about it. But the question becomes, are you killing a character for story purposes, or is it a gameplay mechanic?
In Fire Emblem, for instance, when a party member died, their death was permanent, and the story moved on and was affected by their death. Recent RPG's have emulated this technique (notably within the BioWare franchises).
Or you could go further, having the character's death be the main aspect of the story...like perhaps the character stumbles upon their rotting corpse periodically because he was killed repeatedly and is perpetuating a cycle of rebirth (y'know, like respawn!)
Better yet, with each death the character is reincarnated, or takes control of another party member (essentially creating a phantom party member).
However, if you are simply killing the character because they've become "too good", one must be careful to do this for a reason, or else you risk alienating the players.
Another danger is that the next person to replace the former main character may not be as endearing as the previous one. An example would be Sora, from Kingdom Hearts 2 (who I am convinced is a moron and yet everyone seems to count on), whereas Roxas seemed infinitely more capable (and yet still a moron of a different flavor...sea salt flavor, to be precise).
But...this is your game. You want to off your character, you have that creative liberty.