The Goomba King was originally an ordinary Goomba. Once Bowser stole the Star Rod from Star Haven, the Goomba begged Bowser to turn him into a king with its power, so he did. Though his size and HP greatly increased, his attack and defense did not. With his henchmen, the Goomba Bros., the Goomba King set up a fortress to block a bridge on Goomba Road leading to Toad Town. He fought Mario and Goombario as they made their way through Goomba Road, but was defeated and retreated into the fortress. He found to his annoyance that Red Goomba didn't hide the switch in the fortress, but hid it in the grass. Mario heard this, and hit the switch. The instant he did, the Goomba King jumped onto the fortress's tower and tried to trick Mario so he wouldn't hit the switch, but it was too late. The tower of the fortress crumbled, revealing the bridge, which jumped up like a spring back into place, in the process sending the Goomba King flying into the distance, falling beyond the chasm. It is unknown if he survived.
The Goomba King appeared in the credits parade at the end. He is upside-down in a tree, with the Goomba Bros. circling it. Eventually he falls out of the tree and stands upright again. This does not indicate his survival, however, as the credits parades are non-canon.
The Goomba King has 10 HP, 1 attack, and 0 defense. The Goomba Bros. are his partners in the battle, but having just taken a beating they have 2 HP each, 1 attack, and 0 defense. Mario can defeat the Goomba Bros. first by attacking a Goomnut Tree, causing a Spiked Goomnut to fall and defeat the Goomba Bros., while doing 3 damage to the Goomba King as well. The Goomba King attacks by kicking Mario. He can also shake the other Goomnut Tree to make spiked Goomnuts fall on Mario for 2 damage. This is his most powerful attack and can only be used once. If Mario defeats the Goomba Bros. on the first turn, or early enough, then if he and Goombario keep attacking each turn, they will win. Mario can also use Power Jump on the Goomba King for 3 damage.