Pokemon LeafGreen is from the third-generation release of Pokemon. It's a remake of the first-generation Green game, which was not released in the United States. It was released in conjunction with Pokemon FireRed. You can earn a single Master Ball in the course of the game. To get more than one, you will need to use the Action Replay and cheat code to add more to the game.
About the Master Ball
The Master Ball is probably the most popular Pokeball, both due to its rarity and that fact that it can catch any wild Pokemon without fail. In all the games, including LeafGreen, you get only one Master Ball legitimately during the game. In regular play, you get the ball after you defeat the gym leader and Team Rocket leader Giovanni by going to Silph Co. and initiating conversation with the president of the company.
Action Replay Master Ball Code
The code for generating the Master Ball in the United States version of LeafGreen is, in two lines:
There's actually two elements to this code. The first line defines your game as the US version of LeafGreen, and the second line is what defines the Master Ball. This code adds the Master Ball to the shop, not to your inventory. You will need to go to the shop to get the ball.
Using the Action Replay
Insert the Action Replay into the Gameboy Advance slot, then the game into the Action Replay cartridge. Turn on your handheld; if you're using the DS, start the Gameboy Advance game. The Action Replay will detect the game. Move to the code options on the side and choose "Add." Enter a name for your cheat, choose "Next" and then enter the code in two lines. Click "Next" to go back to the LeafGreen code list. Make sure the code is selected. Start your game.
Using the Master Ball
Once you have the Master Ball added to your inventory you can use it in any fight with a wild Pokemon in which the option to catch the Pokemon is available. During the fight select the "Bag" and navigate to the balls pocket. Select the Master Ball. It will toss the ball and after the usual three-shake delay, you'll get the usual prompts from catching a Pokemon.