Anwar, I'm sorry that's a big jump from 5.1 to 6.5 -- i think you're going to have to do a fresh install. Do you have a stand-alone host? I would backup your VMs and install 6.5 (or 6.7) with a fresh start. Someone else who is a LOT more knowledgeable than myself may be able to assist. My apologies, i know nothing.
If you can upgrade from 5.1 to 5.5 you *MAY* be able to use vCenter to perform the rest of the upgrade, but I don't think you can make an easy transition from where you are at using the one-liner upgrade that I was able to perform. Best of luck, please let us know how you make out!
EDIT: I found this link, it may be of some use to you --> http://www.provirtualzone.com/vmware-how-to-upgrade-to-esxi-6-x-using-vmware-update-manager/
Or perhaps this (i believe it's for 5.5, but should be similar process): https://www.experts-exchange.com/articles/18819/HOW-TO-Upgrade-VMware-ESXi-5-5-to-ESXi-6-0-in-5-easy-steps.html