Although there is a way, you really don't want to do it. It's very complex, and dangerous if you screw up the steps.
The question is, why do you want to do this? If it's because you bought a used machine and want to customize it for yourself, you need to erase the hard drive and reinstall the system, bringing the machine back to "factory settings." You don't know what state the machine is currently in. There could be malware or illegal/stolen software installed. You don't want to use it in that state.
If you have other reasons, just create a new user with the desired username. (If the old account is an administrative user, make the new account an administrative user as well by checking the "Allow user to administer this computer" box.) Migrate any data you want from the old account (see Transferring files from one User Account to another). Then delete the old account.
If you want to see the more dangerous method, go here:
I definitely don't recommend doing that, though.