I'm writing my own fantasy novel and the way I want it to end is with the villain showing his humanity to the hero, begging for mercy, and when the hero is about to spare him the villains stabs him with his sword. The hero becomes aware that the villain will never change and with his final breath he stabs the villain back, they both die, their deaths symbolize their duality; they might have similar goals but the way that they want to achieve those goals are completely opposed. Good cannot thrive without evil and evil cannot exist without good, they both go to their eternal sleep as the world is left in peace.
I want to know if this is a good idea and if there are any good examples of this idea in execution? Thanks for your help.