This guide covers ALL Moto G 2015 models (including the G Turbo) that can be bootloader unlocked, are running stock Marshmallow, and have TWRP available, it doesn't matter if it is the XT1540, XT1541, XT1543, etc., the method is identical. In fact, this method will work on all 2015 and 2016 series Moto phones running Marshmallow, including the Moto E, X, G3, G4, and Z.
Please read completely and make sure you understand each step and how to do it, if you don't get something search the thread or ask an open question.
tl;dr version for advanced users: Skip to "How to do it" section
I wrote this tutorial because there are still lots of failed root attempts using older "standard" methods that do not work on this device. I also do not like the "one click" root methods, because they can and do fail (KingoRoot will brick a Moto G3, regardless of what it's web page says), and when they do people have no idea how to fix it. The manual way is not difficult, and it teaches you how to work on, fix, and use your device on a level above that of the average smartphone user.
I will only cover the details of rooting, the prerequisites are covered elsewhere in detail and I will link to reliable sources for the information. Specifics of the prerequisites are outside of the scope of this tutorial, but are open for discussion in this thread.
1) Device must have an unlocked bootloader. See Moto - Unlocking the Bootloader for more info.
NOTE: Performing this prerequisite will give you all the tools (fastboot) and drivers needed to continue, and wipe your device, meaning erase all your information and programs. Make sure to backup any important data first. This step will also permanently void your warranty once an unlock code has been issued by Moto, it doesn't matter if you even use it, your warranty is done.
2) You need to have TWRP installed or one-time booted via fastboot. CWM and other recoveries will NOT work at this time. See TWRP for the Moto G 2015 or TWRP for Moto G Turbo.
3) You need a copy of the latest STABLE SuperSU ZIP from Chainfire's site on the internal storage or SD card of your device. As of this posting UPDATE-SuperSU-v2.76-20160630161323.zip is the current stable version.
NOTE: Version 2.77 BETA is intended specifically for the Note 7 and should not be used for rooting Moto devices, in testing it doesn't brick or stop boot, it just doesn't show up or work. Stable version are even numbered.
4) Reboot and start TWRP recovery, the method you use to do this doesn't matter (boot or flash).
How to do it:
Now, the procedure is the same whether you are trying to root the first time, or you did it the old way just flashing SuperSU and are now not able to boot...
In TWRP, go to Advanced and open the Terminal, in the terminal type this EXACTLY as shown:
Now press enter (there is no confirmation returned), then exit and press the Home key. Go to Install and select the SuperSU zip file you downloaded from Prerequisite #3 and swipe to flash it and reboot. No need to clear caches or anything else but you are welcome to if you wish. You can install SuperSU updates normally through the app going forward (as of this posting).
Why do I have to do this???
For whatever reason, the install script for SuperSU does not recognize that this device (like many others) requires a systemless root installation. By creating /data/.supersu in the TWRP recovery environment, the SuperSU install script parses the file and sees
SYSTEMLESS=true and ignores what it auto-detects and forces a systemless root installation.
Hope this is helpful to someone!
As always, if this is the first time you have booted TWRP or attempted root... BACKUP IN TWRP FIRST!!! Once the system is modified, it cannot be undone (easily) and you will always have a known good starting place if the worst happens.
DISCLAIMER: I am not responsible for anything that happens... Your device, your responsibility, no matter what happens... Although all the information here has been tested and is known to work with no issues except where noted, things occasionally can and do go wrong and we cannot foresee every possible scenario or circumstance.
My original article