Messi and his father, Jorge, have been charged with three counts of tax fraud worth €4.1million, dating back to a period from 2007 to 2009.
Proceedings began on Tuesday but the Barcelona forward arrived to testify in person on Thursday, just four days before he is due to represent Argentina in the Copa America Centenario in the United States.
The 28-year-old denied knowledge of any fraudulent activities, stating that football was his only focus.
"I never asked my dad about these things," Messi is quoted as telling the court by .
"The truth is that, as I said before, I trusted him and the lawyers. I didn't know anything about it, I just played football."
When questioned about the existence of a company called Jenbril, registered in Uruguay to handle payments relating to his image rights, Messi said: "I didn't know I was a member and manager of this company, I signed it because he [Jorge Messi] said so and I trusted him and the lawyers.
"All I knew was that I was signing a deal with sponsors to do adverts, photo shoots and things like that.
"I remember we went to a notary but I was 18 when I signed it and as you can imagine, I was in a different world. I don't remember anything about it."
Jorge Messi repeatedly told the court his son "knew nothing about it".