Argentina international Messi and his father Jorge appeared at the hearing in the coastal town of Gava, where Messi lives, near Barcelona after being accused of defrauding the state out of £3.5million by avoiding tax on his image rights.
Messi was questioned for half an hour and his father an hour before the pair were whisked away in separate cars.
The prosecution alleges the Messis set up shell companies in Uruguay and Belize to avoid paying tax in Spain.
Both men deny the charge, saying the deals, which took place between 2007 and 2009, were done by Messi's former agent without their knowledge.
The Messis have since made a payment of £4.2million to the taxman, the alleged unpaid amount plus interest, but it did not stop the hearing from taking place with Spanish authorities eager to clamp down given the country's financial problems.
Friday's hearing will determine whether the case is pursued further.
Even if it is not, the issue has tarnished Messi's clean-cut image.
The 26-year-old has overcome a childhood growth issue to become one of the most recognisable - and wealthy - sportsmen on the planet.
A four-time FIFA World Player of the Year, Messi has scored 323 goals in 387 appearances for Barcelona.