I read on Bulbapedia that if you hatch a Sneasel with the move Beat Up in the third slot, it somehow changes to Celebi due to the move Beat Up and the Pokémon Celebi having the same code of 251. I tried this and it didn't work. Is this a hoax?
It's not a hoax. It didn't work because you didn't follow the procedure properly. The glitch requires more than just the Sneasel and Beat Up - you'll need more Pokemon to perform the glitch (including cloned Pokemon) and you'll have to follow some steps in order to do the glitch correctly. These details can be found here.
Be warned, though: the glitch can have some unwanted side effects that the link above will also explain.