In order to hide the existance of Big Boss (who was using parts of liquid's and solidus's bodies to be recreated) Ocelot had himself all hypnotised and such until he basically became Liquid in mind. He never was truely Liquid, he just beleived he was, and thus the nanomachines did to.
Ending was epic, though a tad sad. I always hate it when I finish a good story. It makes me just want more... thus I am playing again with my new bonuses and such. :D