The whole implication was that, during MGS2, Ocelot did in fact get obsessed by Liquid's arm. Being the son of The Sorrow, he likely had a distinct psychic connection with the dead and this enabled Liquid to temporarily effect his mind. After the unnecessary destruction and completely loss of control associated with the Arsenal Gear incident, Ocelokt finally had the arm removed to take out the possibility of being overshadowed at an inoppertune moment. Hence the new arm in Guns of the Patriots. The hypnosis and nanomachines were simply to complete the illusion to make sure it was entirely impossible for the Patriot AI's to determine the difference.
The only part it's not entirely clear on is who, exactly, knew he was doing this to himself. From what the final scenes depict, it could have just been Ocelot and Big Boss who were aware of the deception. But people have been trying to figure out if EVA had any idea about it prior to her death. Based on her reaction toward the end of her time in 4, I'd have to imagine she didn't, but I've heard some very compelling arguements that claim she knew the whole time too.