I remember playing the N64 version of Super Smash Bros where you could play as master hand. Was it just my imagination or there's a way to do it?
Super Smash Bros. Melee is the only game you can play as Master Hand without using cheating devices like GameShark or Action Replay. The glitch for Melee was found a few years after the game came out and you can find a video of it here and a description of how to perform it here. However, as stated in the wiki for master hand
So you need a Gameshark to play Master Hand in the N64 or Wii games.
Apparently the GameShark codes to play him (for the N64 version) are: