Mario & Sonic at the Olympic Games

The first time Mario and Sonic the Hedgehog appear in the same video game is not a platformer or an action game, but a collection of Olympic-themed minigames such as cycling, archery, and javelin.
The Long Jump event with Mario.
The Long Jump event with Mario.
Mario is shooting basketballs in this Dream Basketball event.
Mario is shooting basketballs in this Dream Basketball event.

A player can pick from a roster of 16 characters each with their own skill. Half of the characters are from The Mushroom Kingdom whilst the other half from Sonic's home planet.

There are a good range of events ranging from archery to pole vault as well as some special non-realistic events known as "Dream events". These are Mario and Sonic's take on some of the games including a made up game. For instance, in Dream Race you have to avoid sand pits that slow you down and collect items to provide an obstacle for your opponents, speed you up, or slow your opposition down.

There are also some bonus games such as Whacka'mole! and Voice memory. For each of the levels for the different games you complete you will unlock a piece of information about the Olympic Games, and once you have completed a whole set of a game you will unlock either a Mario or Sonic related soundtrack, that you can when you want.

Originally, Silver the Hedgehog, Donkey Kong, and the infamous cross-dresser Birdo were all supposed to be characters, but for unknown reasons, they were not, but their character models were all left on the disc. Silver and Donkey Kong eventually made it into Mario & Sonic at the Olympic Winter Games, Birdo has yet to appear in the series as a playable character.