Unlocking the bootloader is the first step before you can flash firmware manually with fastboot. Motorola offers an official unlock process: you collect unlock data from your phone, submit it on Motorola's bootloader unlock page, and receive a unique unlock key by email.
Read the warnings first. Unlocking erases all data on the phone, can void your warranty, and is not possible on every model. Many carrier-locked versions of Motorola phones cannot be unlocked at all.
Open Settings > About phone and tap Build number seven times. Then open Settings > System > Developer options and turn on both OEM unlocking and USB debugging.
If OEM unlocking is greyed out, connect the phone to the internet and check that it is not carrier-locked. On some carrier models the option stays disabled, which means the phone cannot be unlocked.
Power the phone off, then hold Volume Down + Power until the bootloader screen appears. Connect it to your PC and run:
fastboot devices
If your serial number does not appear, fix the drivers first with the USB drivers guide.
Run the command below. The phone prints several lines starting with (bootloader). Copy all of those lines and combine them into one continuous string without the (bootloader) prefixes or any spaces, as Motorola's unlock page instructs.
fastboot oem get_unlock_data
Open Motorola's official bootloader unlock page, sign in or register, paste your combined unlock data and click Can my device be unlocked?. If your device qualifies, accept the terms and request the key. Motorola emails you a unique unlock key.
Back in fastboot mode, run the command below with the key from the email. The phone asks you to confirm on the screen, so use the volume keys and power button as shown there.
fastboot oem unlock UNIQUE_KEY
The phone erases its data and restarts. The first boot is slower than usual and a warning screen about the unlocked bootloader appears at every startup. That is normal.
Yes. Motorola's official unlock process is free. Beware of sites that charge for unlock keys.
Yes. Unlocking factory-resets the phone, so back up first.
It may. Motorola's terms on the unlock page say so, so read them before you accept.
For the manual fastboot method, yes. For an official reinstall you can use Rescue and Smart Assistant, which does not require an unlocked bootloader.
Only try it when the phone is on a fully stock, matching build. Relocking on a mismatched build can brick the phone.
Ready to flash? Browse the Motorola stock ROM library.