[Moto E5 Questions & Answers] Smurfy76:
I'll try and find the guide I used. I had the same issue till I used this guide.

---------- Post added at 07:30 PM ---------- Previous post was at 07:25 PM ----------

This is weaknpcdotcom guide so I take no credit.

Prerequisites

ADB and Fastboot installed on PC

Motorola USB Drivers installed for your device

TWRP and fstab files from E5 Play Root / Recovery thread.

Latest Magisk

DISCLAIMER

Unlocking your bootloader is not for the faint of heart. Unlocking your device and installing your own software might cause the device to stop working, disable important features and functionality, and even make the device unsafe to the point of causing you harm. Neither Motorola, nor your wireless carrier or retailer from whom you purchased the device, will be responsible for such damage, so please do not unlock or load any software unless you know what you are doing.

You have only yourself to blame. Unless you have a Developer Edition device, once you get the unlock code, your device is no longer covered by the Motorola warranty; in other words, please don't blame us if things go wrong, even if they appear unrelated to unlocking the bootloader.

The law still applies. You still need to operate your device in compliance with all applicable laws, rules and regulations prescribed by the FCC, and any other governmental agency for that matter. Your wireless carrier may prohibit unlocked devices from operating on their network.

Steps from Stock Device

1 - Unlock Bootloader

Procedure

Enable Developer Options on your Device (Settings -> About Device -> Software -> Tap Build No. until Dev. Options are enabled.

Enable USB Debugging under Developer Options.

Enable OEM Unlock under Dev Options

Follow the Motorola Bootloader Unlock Prodecure on Motorola's Customer Support Portal

2 - Flash TWRP

DISCLAIMER

This process will overwrite your recovery partition. It is wise to make a complete nandroid backup of your device prior to performing any of the steps below.

Procedure

Download Magisk zip package, TWRP 3.2.1 E5 Play and fstab.qcom files from the E5 Play Root Recovery thread.

Put these 3 files in your adb/fastboot directory on your pc

With your phone on and booted to android, connect to your PC using your USB cable.

Open Command Prompt and cd to your ADB/Fastboot directory

run "adb devices" to make sure your device is connected to adb (you will need to approve the initial connection on your device)

manually copy twrp_james.img to your phone's external sd card or

Code:

adb push twrp_james.img /sdcard/

run "adb reboot bootloader" to reboot to fastboot mode

boot directly to TWRP with

Code:

fastboot boot twrp_james.img

make a full backup and store the backup on your phone's external sd card or transfer to your PC.

in TWRP, Reboot->Reboot Bootloader

When back in fastboot mode, flash TWRP to your recovery partition.

Code:

fastboot flash recovery twrp_james.img

fastboot reboot recovery

your phone should reboot to TWRP now on your recovery partition.

3 - Disable Force-Encryption and Root device with Magisk

Procedure

while in TWRP, run the following in your ADB terminal

Code:

adb shell mount -o,rw /dev/block/bootdevice/by-name/vendor /vendor

adb push fstab.qcom /vendor/etc/fstab.qcom

from TWRP menu: Wipe-> Format Data

copy magisk zip to newly formatted data partition

Code:

adb push Magisk-v17.2.zip /sdcard/

From TWRP, Install Magisk zip

You now are rooted and have TWRP on your Recovery partition. After rebooting to Android, make sure you install the latest Magisk Manager first thing.

---------- Post added at 07:33 PM ---------- Previous post was at 07:30 PM ----------

I used this and had no issue. If you get the na screen let it sit for a minute as sometimes it takes a few minutes to boot up. Also before you do this backup everything in twrp if you haven't done so.

---------- Post added at 07:36 PM ---------- Previous post was at 07:33 PM ----------

https://xdaforums.com/moto-e5/how-to/guide-root-twrp-moto-e5-play-explained-t3856182

This is the link to original post.