Initially, install & launch GainTools Exchange Migration Software.
Click on Add source button, select Exchange Server mailboxes and add login details.
Preview Exchange mailbox items and select items using filters to migrate.
Select Office 365 option and enter its login details. You can also select other options.
Now, check map mailboxes option, if required. This will start the migration and offer you report of the process. Click the Finish button when all is done.