Before the events of KRtDL, he somehow came into contact with the Master Crown. (I think) It's raw power consumed him, and he attempted to control it, but Landia stopped him. He then excavated the Lor Starcutter from Halcandra and attempted to use it to defeat Landia, but he failed. Then, after a crash landing on Popstar and convincing Kirby to repair his ship, he also tricked Kirby into beating Landia. Then he had the Crown again. After he initially got the Crown, it put some sort of spell over his mind and getting it became his goal. Part way through the fight, however, after Kirby deals a deadly blow with Ultra Sword, Magolor almost died. The Master Crown then used his body as a puppet to its whims. After the fight, the crown shattered, and Magolor was free. So, it's not necessarily his fault he was the bad guy. But, yes, he did back stab him. If you already knew all this, then you didn't have to read it. But now it's too late. Sorry. (Some of this may be false, I'm not entirely sure)