The Spanish giants beat the Red Devils 2-0 in Rome in 2009 and Messi inspired an emphatic 3-1 win at Wembley Stadium two years later.
However, former United defender Ferdinand believes both those games could have been very different if Barcelona did not have Messi in their ranks.
"I tried to hit him in the chest with my arm and he just went underneath me and I thought to myself, 'this guy is a magician'," he said.
"He's the best player I've ever played against.
"In our dressing room, we all thought that without Messi, we would probably have won those games against Barcelona."
Ferdinand also revealed which manager, Jose Mourinho or Pep Guardiola, he would currently rather play under.
"As a defender, it would be Jose because he would protect me well. But to enjoy it, then it would be Pep," he concluded.