Note: This process assumes both accounts have administrative permissions.
Scenario: I want to use my ArcGIS Online username in My Esri too
Log into ArcGIS Online. Under Organization, click on the cog symbol beside your username. Select ‘Enable Esri Access’. If it reads ‘Disable Esri Access’ you don’t need to take any action.
Log into My Esri. Under My Organizations > Users > Invite Users, send an invitation to your email address, selecting the permissions you want to grant.
Log into My Esri with your ArcGIS Online username, and navigate to My Profile > Connect to Your Organization > Connect with Token. Enter the token from the invitation email.
You will now be able to log into ArcGIS Online and MyEsri with the same account (you may need to refresh your browser to see the change).
Optionally disconnect the old My Esri account by logging into My Esri with the newly connected account and navigating to My Organizations > Users. Use the X beside a username to disconnect a user.
Scenario: I want to use my My Esri username in ArcGIS Online too
Log into ArcGIS Online and navigate to Organization > Invite Members.
Use the option to invite members to join using an account of their choice. Further details can be found here.
Follow the link from the invitation email, and log in with your My Esri account.
You will now be able to log into ArcGIS Online and My Esri with the same account.
Optionally, transfer data and remove the old ArcGIS Online user:
Open the item details page for an item in your content, select Change Owner in the Overview tab and select your newly connected account. Do this for all items you need to transfer. Further details can be found here.
Under Organization, click on the cog symbol beside the username to be removed and select Delete Member