trade it from Pokemon diamond
You can catch them in the wild, in the grass; but sometimes you get them as gifts or at special events. You can obtain Pokemon by receiving a free Pokemon at the start of your journey (known as a "starter" Pokemon), by capturing them with Pokeballs, trading, evolving other Pokemon, or hatching them from eggs.
There is no way to get Deoxys on Pokemon diamond or pearl the only way i know is through action replay if you don't know what it is your in the right spot to find out alright here we go save up 27.00 and go to Gamestop ask the PERSON at the counter for a action replay.
After you defeat the first Gym, go back to Jubilife. Fight the Galactic Grunts to the north and a man should walk up to you and give you a Fashion Case. This gives you access to the Jubilife TV Station. On about the 3rd floor, there should be a man standing next to a woman. Talk to him. When he asks you one question, type in "EVERYONE" and "HAPPY". On the next question, type in "WI-FI" and "CONNECTION". You now have access to the Mystery Gift on Pokemon Diamond! (If this doesn't work, switch them around, "WI-FI" and "CONNECTION" being first.)