Ensure your device is backed up in google drive.
Remove all password and accounts:
Settings>Lock screen & security> remove all passwords, patterns, or PINs.
Remove Google Account:
Settings>cloud and Accounts>Accounts>Remove account.
Factory Reset
Settings>Backup and Reset>Factory Data Reset>confirmation of your password, PIN, or pattern>Delete All.