There is a right way to kill off any character and a wrong way. You should never kill off any character for the purpose of shocking readers just for the sake of shocking them, or making them sad just because you want to make them sad. In your case, it seems that this character’s death would advance the ploy (which is a good reason for a character’s death.) However, considering this is your main character, you have to be a tad more careful. You have to keep some different things in mind.
First, do you have another character (or more characters) to fill the space of protagonist? [name_m]Will[/name_m] you main character’s death motivate them in some way? It appears that you are planning on having your protagonist’s killer take over, which I actually find really interesting. If you worry about their likability, make them likable! Real people have flaws, and maybe this character is just mislead. Have them redeem themselves in some way. Maybe give them an emotional scene where they really express severe regret (maybe have them visit the original protagonists grave site, or have them show their emotions. Have them cry)
[name_m]How[/name_m] did your protagonist’s death occur? Was it a moment of passion or uncontrollable anger, followed by immediate regret? Was it an accident? Was it accidental, but posed as purposeful (this could be a useful revelation, that your villain didn’t really mean to, but none of the characters or the reader know until much later) What drove your villain to be a villain again? [name_m]How[/name_m] are they feeling- right after, a little while after, a long time after? Regardless of the cause, this gives you an opportunity to milk some affection from the reader. If they are going to play the part of the new protagonist, it will be helpful to play with your reader’s sympathies.
Especially since you plan on having your villain eventually become the protagonist, you really need to make sure you come up with a backstory for them. In my opinion, you should do this anyway. It seems like this character is conflicted (seeing as though they are bad, then good, then bad but regretful). Why are they bad in the first place? Did they have a really tragic childhood (think Magneto from X-men, his childhood was horrific which played a part in his becoming a villain)? Did they have a decent childhood, but have something happen that sparked them to act impulsively? (Think [name_u]Loki[/name_u] from the [name_m]Thor[/name_m] movies) [name_f]Do[/name_f] they simply just hate your main character? (think about how [name_u]Loki[/name_u] was jealous of [name_m]Thor[/name_m] in the [name_m]Thor[/name_m] movies, or how Scar resented Mufasa in the [name_m]Lion[/name_m] [name_m]King[/name_m]) Think about what fuels them. Greed? Fear? Pain? Jealousy? [name_f]Every[/name_f] good villain has something. In my opinion, [name_f]Marvel[/name_f] does this amazingly. They generally have amazing villains.
Go ahead and kill that character, just make sure you don’t just blow them off. Kill them for a reason, have them killed for a reason (it doesn’t have to be a good reason. You villain could kill them because they are resentful of your protagonist and was having a bad day!), and handle it correctly. If you plan to make your villain a protagonist, you have to know them as well as your protagonist from the start.
In real short (lol), I think you should focus less on if you should kill this character, and more on how. Kill that character if you want to kill that character, because your readers will continue to read if you handle it well!
I wrote a novel, sorry, but I hope this helps! Good luck!