Messi is accused of failing to properly pay taxes for part of his earnings from Barcelona from 2007 to 2009.
The Argentina forward is not obligated to appear in court until tomorrow when he is scheduled to give evidence before a judge.
Messi and his father, Jorge Horacio Messi, have been charged with three counts of tax fraud for allegedly defrauding Spain’s tax office of €4.1m.
Because of the trial, Messi is missing Argentina’s preparation for the Copa America Centenario, which begins on Saturday in the US. He is expected to fly straight to the US after the trial ends.
Argentina’s first match in the tournament is on Monday against defending champions Chile.
Sentencing is not expected until next week. Even if found guilty, it is highly unlikely Messi or his father will face any jail time. They have denied wrongdoing.
“Everything is good. Everybody is calm,” said Messi’s lawyer, Enrique Bacigalupo, as he arrived at the Barcelona court.
The trial is centred on alleged unlawful activities of Messi’s father, but authorities said the player knew enough to also be named in the case.
Officials said that although Messi was mostly unfamiliar with tax issues, there was sufficient evidence to believe he could have known and consented to the creation of a fictitious corporate structure to avoid paying taxes on income from his image rights.
In addition to each facing a prison sentence of 22 months and 15 days, Messi and his father could also be fined in the amount defrauded and ordered to pay all legal proceedings and the loss of any possible tax benefits for a year-and-a-half.
Messi is just the latest high-profile player to have to deal with Spain’s tough tax system. Neymar, Javier Mascherano, Adriano, and Xabi Alonso also were targeted by authorities recently.
Mascherano, Messi’s teammate with Argentina and Barcelona, was handed a suspended one-year prison sentence earlier this year for not paying nearly €1.5m in taxes for 2011 and 2012.
Brazil striker Neymar recently had to give evidence before a judge because of alleged irregularities involving his transfer to Barcelona.
He and the club were accused of withholding the real amount of the transfer fee, in part to avoid paying the full amount of taxes.
Messi was also being investigated by Spanish tax authorities after his name was among those released in the probe of international offshore accounts, known as the Panama papers, although he was not charged for those allegations.