In Link's world, Ganondorf defeats him and Zelda. Ganondorf then learns about a world teleporter, in which he can conquer all of the wolds because he got an enormous amount of power when he killed Zelda. Ganondorf decides to conquer Sonic the Hedgehog's world, but something went horroribly wrong and he ended up in Mario's world!
A Koopa tells Ganondorf about Bowser after the accident. Ganondorf thinks Bowser will help him destroy this world, so Ganondorf sets off to Bowser's castle. Bowser refuses, so Ganondorf uses Zelda's magic to make him king of Koopas.
When Mario hears about this, he starts his adventure to the castle.