But Luke feared that he wasn't powerful enough or that he would slip to the dark side, when he attacks Vader. He still can't overthrow him until he attacks him out of anger. Only then he realizes what he has done.
It wasn't his plan to defeat the Emperor, he wanted to save Vader at all costs and risked his own life.