How to change user name?
If you have sufficient space on your drive to duplicate your user account temporarily…


Copy your home folder /Users/old-username to /Users/new-username.

sudo cp -a /Users/old-username /Users/new-username

Create a new user account in Users &amp; Groups. Enter the new-username as the username when creating the account. You will be prompted with the following:


  The Users folder already contains a folder with the same name as the home folder for this account.


Choose Use Existing Folder.
Log out of your old-username and log in to your new-username.
Once you've verified everything is as it should be, you can delete the old-username account.
If permissions are incorrect, continue from step 7 of the next section.


If you don't have sufficient space to duplicate…


You even more so need a backup before proceeding with this method.
Create a new user account or use an existing secondary administrator account. This account must not have either old-username or new-username. Log in to this account. Make sure you are not using Fast User Switching and old-username is correctly logged out.
From this account, rename /Users/old-username to /Users/new-username using Finder.
In Users &amp; Groups, unlock the preference pane, right-click on old-username and choose Advanced Options…. You'll be presented with the pane you screenshot in your question.
Change Account name to new-username and Home directory to /Users/new-username.
Quit System Preferences. Do not log in to new-username yet.
Shut down your Mac and boot into the Recovery HD by holding ⌘R on boot.
Open Terminal from the Utilities menu and run resetpassword. A new dialog will be shown.
Select new-username from the accounts list, then click Reset for Reset Home Directory Permissions and ACLs.
Once complete, restart and boot normally, then log in with new-username.