Write a story with an included prophecy. The prophecy ultaimtly suggest the main charater will win for the good.
When things are almost complete open the hidden twist.
Hidden Twist
Rewrite the prophecy so that the main character will intranet it as they win, when it means the evil will win.