Magic boxes are used to capture imps using the Hunter skill. They require a Hunter level of 71 to place. They can be bought in the hunter shop in Yanille and Nardah for 720 coins. Successfully catching an imp grants 450 Hunter experience.
The boxes can be baited with beads, which makes them slightly more attractive to imps. If, while deployed to catch an imp, a magic box fails to catch one, it will be labelled Magic box failed until it deactivates or is picked up. When an imp is caught, the magic box will become an Imp-in-a-box (2). The imp will agree to take two items or stacks from the player to the bank in exchange for its freedom. However, they can randomly refuse and will always refuse to do so past level 30 Wilderness. You will also be unable to bank any items using the Magic box if you have been teleblocked.
Having a magic box in your inventory prevents you from entering the Puro-Puro mini-game.