Long has it been but MAL has finally launched their new API. I've yet to update the import to the new code but you'll eventually find it at https://anitrakt.huere.net.
Sorry for being lazy :/.
trakt.tv "MyAnimelist" Import
This script will help you import your MyAnimelist.net data into your trakt.tv Account.
Let's keep it real tho! It will not be able to do all the work for you. trakt.tv builds it's database from the open and userdriven TV and movie databases thetvdb.com and themoviedb.org which are not dedicated to Japanese animation only. MAL keeps a show's season as a seperate entry, those sites do however treat them as additional season of a series which results in no direct translation of the content. The matchup is based on a maintaned cross-map database which won't be complete (you can find the index of it here).
Here is how it will play out:
Only new content will be added to your profile (but it will backfill missing episodes or ratings).
The items will be added at today's date unless the start/end date is present on your MAL list.
Season ratings will be added, this is a heads-up to long time trakt users! If you want to make sure you're up to date with your ratings consider a sync from trakt before this!
The show level rating will be set to that of the highest rated season. The result of this will be displayed at the entry of the first season.
Consecutive seasons on your watchlist will not be added as such. trakt uses the progress page for this.
A show might display more episodes as added than really exist on trakt. This is because the count sometimes differes from database to database (ex. recaps/specials as part of a season). [they will persist on every sync run]
Unmatched content will be listed afterwards so you know what is still missing.
TLDR: Please enter your MAL username and press "Import" to start the process (authorization required):
(Please check the spelling to match your account! I urge you to wait up to 30 minutes before running it again due to potential caching issues of your trakt data which could lead to duplicate plays otherwise!)
PS: I won't be supporting the upload of MAL backups to prevent abuse. You'd have to create a temporary profile based on it on MAL itself.
Instead looking for a way to sync your trakt history to your MAL? Then check out the Sync script!