The Secret Door
The "secret" door in Mossdeep City is located in the house that is directly south of the Pokemon Mart store. The door is located on the back wall of the room once you enter the house; when you try to open it a message appears saying that the door "appears to be locked." An old man in the room makes no mention of the door, only saying that he enjoys watching Pokemon trainers battle. There is no key item in the game that unlocks the door and no storyline events cause it to unlock.
Mystery Event
Before you can open the door you must be part of the Mystery Event Club. To join the club, you must defeat the first five Gym Leaders and receive badges from them. Travel to Petalburg City and visit the Pokemon Center; locate the computer terminal in the Pokemon Center and talk to a man standing next to it. Choose the "Yes" option when he asks if you want to make a new profile, then rearrange the four words he says so that they say "Mystery Event Is Exciting." Once you've done this, you will become part of the Mystery Event Club.
Opening the Door
To open the door, return to Mossdeep City and save your game. Turn off the Game Boy Advance and connect it to a second Game Boy Advance system using the Link Cable for your system; the second system should have a Nintendo E-Reader inserted into it. Turn on the second system and scan a Pokemon Trainer E-Reader card, then start your game again. Enter the house, at which point the old man will be standing in front of the door; he will let you save your game and pick three Pokemon for a special three vs. three battle. The door is now unlocked and you can pass through it to find a visiting Pokemon trainer in the next room ready for battle.
"Walk Through Walls" Cheats
It's possible to access the room beyond the secret door if you don't have a Nintendo eReader device, though a Game Shark or other "cheat" device is required to do so. By enabling a game cheat that allows you to walk through walls, you can walk through the door while it is locked and access the room beyond. Instead of another trainer, a duplicate of the player's sprite is standing in the middle of the room. If you talk to the duplicate, a text box filled with question marks will appear and cause the game to freeze.