You will need:

  • A game cartridge of 3rd gen GBA Pokémon game with a save file on it. (Ruby/Sapphire/Emerald or Fire Red/Leaf Green)
  • A Nintendo DS or DS Lite (DSi and DSi XL is not good)
  • A game cartridge of 4th gen DS Pokémon game with a save file which has National Dex. (Diamond/Pearl/Platinum or Heart Gold/Soul Silver)
  • A game cartridge of 5th gen DS Pokémon game with a save file which has National Dex. (Black/White or Black 2/White 2)
  • A Nintendo 3DS/2DS/3DSXL/New3DS/New3DSXL
  • Pokémon Bank/ PokéTransporter app downloaded/paid on the 3DS/2DS/3DSXL/New3DS/New3DSXL
  • Wi-fi internet connection for your 3DS
  • A game cartridge or download version of a 6th gen 3DS Pokémon game. (X/Y or Omega Ruby/Alpha Sapphire)

Important! This is a one way migration! You can't send back Pokémon to older games!
3rd gen to 4th gen

  • Step 1: Insert your GBA game to the GBAslot of your DS/DSLite
  • Step 2: Insert your 4th gen DS game to the DS slot of your DS/DSLite
  • Step 3: Start your 4th gen game and go the the Pal Park. Important: You need a National Dex to access the Pal Park.
  • Step 4: Use the Pal Park to migrate 6 Pokémon from the GBA game. In DPPt you can only migrate 6 Pokémon in every 24 hour. In HGSS, you can migrate them without waiting.

A nice trick if you don't want to wait 24-hours per 6 pokémon:

  • Step 1: Migrate the first 6 pokémon of the day.
  • Step 2: Save, turn of your DS and swap out your GBA Pokémon game to an other GBA pokémon game.
  • Step 3: Change the date in your DS to the next day.
  • Step 4: Try to migrate from the second GBA Pokemon game. You will be warned of the change in date, and prevented from migrating from the second GBA Pokemon game for one "day".
  • Step 5: Turn of your DS and swap back your first GBA game.
  • Step 6: Migrate again from your first game.

Thanks for /u/357a for reminding me to include this.
4th gen to 5th gen

  • Step 1: Insert your 4th gen DS game to your DS/DSLite. This part can be done with any kind of DS which capable of DS Download play (DS/DSLite/DSi/DSiXL/2DS/3DS/3DSXL/New3DS/New3DSXL)
  • Step 2: Insert your 5th gen DS game to your 3DS. This part can be done with any kind of DS. (DS/DSLite/DSi/DSiXL/2DS/3DS/3DSXL/New3DS/New3DSXL)
  • Step 3: Start your 5th gen game and visit the Transfer Lab.
  • Step 4: Use the Transfer lab to make a DS Download play Minigame and Download this game with the DS which have the 4th gen Pokémon game in it.
  • Step 5: Migrate 6 pokémon with every minigame you play with it.

5th gen to 6th gen

  • Step 1: Download Pokémon Bank to your 3DS. (or 2DS/3DSXL/New3DS/New3DSXL)
  • Step 1.5: Insert your 6th gen Pokémon cartridge to your 3DS since Pokémon Bank requieres it. (only if it's not a downloaded version)
  • Step 2: Subscribe for a 1 year service for 5USD/5EUR or if there is a 30-day trial, start your trial.
  • Step 3: Download Pokémon Transporter app from Pokémon Bank.
  • Step 4: Close Pokémon Bank, take out your 6th gen game and insert your 5th gen Game into the DS/3DS slot.
  • Step 5: Start your 5th gen game and put every Pokémon you want to migrate to the Box 1, then save your game.
  • Step 6: Go back to 3DS Home menu, and start Pokémon Transporter app and transport the Pokémon from Box 1 to your Pokémon Bank.
  • Step 6.5: Go back to the Home menü, take out your 5th gen game, and put the 6th gen into the DS/3DS slot.(only if it's not a downloaded version)
  • Step 7: Start Pokémon Bank and move all Pokémon from your Transport Box to your 6th gen game.

Congratulations! Your Pokémon arrived to your XYORAS game!
Bonus: If you have a Pokémon from RSE and you migrate it to ORAS, take it to the Game Director (located in the Cove Lily Motel in Lilycove City after you beat the game) he will give you a 'Time Travel Award' that you can place in your Secret Base.

https://www.reddit.com/r/PokemonHowT..._to_3ds_games/