Messi – winner of a record six Ballons d'Or – and Ronaldo are regarded as two of the greatest ever players, with debate often centred on who stands alone atop the all-time list.
Kaka played alongside Ronaldo at the Bernabeu between 2009-13, but the 2007 Ballon d'Or winner selected Messi as his preferred choice.
"I played with Cristiano and he's really amazing, but I'll go with Messi," Kaka said when asked who he would pick out of Messi or Ronaldo during an Instagram Live Q&A for FIFA's channel.
"He's a genius, a pure talent. The way he plays is incredible."
But on five-time Ballon d'Or winner Ronaldo, Kaka added: "Cristiano is a machine. It's not just the way he's strong, powerful and fast; he's strong mentally.
"He always wants to win and play. To be the best. For me, that's the most incredible thing he has.
"In the history of sport, they [Messi and Cristiano] are definitely in the top five. We are very lucky to have been able to see both of them."
Messi has been in the headlines recently after he and his Barcelona team-mates agreed to have 70 per cent of their wages slashed to help protect the jobs of the club's staff with coronavirus halting football worldwide for an indefinite period.
He also claimed figures within the club were putting pressures on the players to act, however there was always a plan within the first-team squad to make a gesture in solidarity with their fellow employees.
"Much has been written and said about the Barcelona team in regards to the salaries of the players during this state of emergency," a statement from Messi said.
"We want to clarify that our will has always been to take a cut in the salary we receive, because we fully understand that this is an exceptional situation and we are always the first ones to help the club when asked.
"Therefore, it does not surprise us that from within the club there were those who tried to put us under pressure to do something we always knew we would do.
"The agreement has been delayed for a few days because we were looking for a formula to help the club and its workers during these difficult times.
"Apart from the reduction of 70 per cent from our salary, we will also make contributions so that club employees can collect 100 per cent of their salary while this situation lasts.
"We do not want to say goodbye without sending an affectionate greeting and a lot of strength to all those having a hard time in these very difficult times, as well as to all those who patiently await the end of this crisis in their homes.
"Very soon we are going to get out of this and we will all do it together."