Unlocking the bootloader will delete all data on your device and void the warranty. It will also remove the device's security protection and expose it to malware.
Tap 7 times on the build number (MIUI Version / Build number) in phone settings.
Then go to: Settings → Additional settings → Developer options → Mi Unlock status
Tap "Add account and device"
After successfully adding your account, install MiUnlockTool
Run MiUnlockTool with the command:
miunlock
It will prompt you for login method. Sign in with the same account you added in Mi Unlock status. Follow the prompts and complete the steps.