There is a feature called the PokéTransfer located on Route 15. Inside you can migrate 6 Pokemon from a generation 4 game (Diamond, Pearl, Platinum, HeartGold, SoulSilver).
You will need to catch the Pokemon through a mini-game. Any Pokemon you don't catch in the time limit will not be transferred and stay on the old game.
Note that (a) this is permanent migration, you can't trade the Pokemon back to gen 4, (b) you cannot migrate items, you must take them off the Pokemon before transferring and (c) you cannot migrate Pokemon knowing HM moves.