The 28-year-old star told the court that his father handled his finances and he knew nothing about how his wealth was managed as he took the stand at his tax fraud trial for the first time.
"I was playing football, I had no idea about anything," Messi told the Barcelona court hearing the case on the third day of the trial.
"I trusted my dad and my lawyers", he added.
Messi, who wore a black suit and tie, was earlier cheered and jeered as he emerged from a van accompanied by his father Jorge Horacio Messi.
The two are accused of using a chain of fake companies in Belize and Uruguay to avoid paying taxes on €4.16 million ($4.6 million) of Messi's income earned through the sale of his image rights from 2007-09.
Dozens of photographers and onlookers crowded behind metal barriers and a line of police that guarded the entrance of the court to catch a glimpse of the five-time Ballon d'Or winner.
Watch Messi arrive at court:
Most applauded but some jeered and criticised the player.
"If he cheated, he has to be sentenced no matter how much of an idol and Ballon d'Or winner he is. These are four million euros less to pay for hospitals, schools, firefighters, roads," Jose Seco de Herrero, 25, told AFP.
"Thief!," yelled out one onlooker. "Go play in Panama," cried out another.
The tax fraud trial comes at a time of simmering voter anger over steep government cuts to health and social spending, as the government struggles to bring Spain's public deficit down.
Spanish tax office experts were questioned in court on Thursday before Messi and his father will take the stand. The trial is expected to wrap up on Friday.
After his court appearance in Barcelona, Messi will jet off to the United States where Argentina take on Copa America defending champions Chile in their first game of the three-week tournament in California on Monday.
The high-profile case kicked off on Tuesday without Messi, as he was recovering in his hometown of Rosario in Argentina from a lower back injury he suffered during a friendly match against Honduras last week.
Under Spanish law, a defendant is not obliged to attend the full trial if prosecutors seek a jail sentence of less than two years - as is the case here.
Messi's former tax advisors came out in support of the football star when they took the stand on Wednesday, saying the player never handled his own wealth management.
He "didn't take any decisions and I didn't see anyone consulting him for anything", Angel Juarez, one of the partners at law firm Juarez Veciana which managed Messi's tax affairs at the time, told the court.
Iñigo de Loyola Juarez, another partner and Juarez's brother, added: "I don't know if any of my correspondence has been included in the case, but they will see that Lionel Messi does not appear in any of it."
The Barcelona forward and his defence team have long argued that Messi's father handled the footballer's finances without reporting to him, and the striker was not aware of any wrongdoing.
Both Messi and his father, who has managed his son's affairs since he was a child, have been charged with three counts of tax fraud.
Spanish prosecutors are seeking a jail sentence of 22-and-a-half months for them if they are found guilty, plus fines equivalent to the amount that was allegedly defrauded.
But any such sentence would likely be suspended as is common in Spain for first offences carrying a sentence of less than two years.
Messi and his father made a voluntary payment of €5 million ($5.6 million)-- equal to the amount of the alleged unpaid taxes plus interest - in August 2013 after being formally investigated, which is expected to mitigate any sentence if they are found guilty.
"On the pitch he is the best, but if they have to try him and sentence him they should do it, even if he is a footballer and is known around the world," said 25-year-old Eric Irias, who came to the court wearing a Messi jersey which he bought on Wednesday.