Argentine Messi, aged 29, was also fined €2m euros (£1.7m; $2.2m) by the court in Barcelona.
In addition to the prison term, Messi's father, Jorge, was fined €1.5m for defrauding Spain of €4.1m in 2007-09.
However, neither man is expected to serve time in jail.
Under the Spanish legal system, prison terms of under two years can be served under probation.
The pair also face millions of euros in fines for using tax havens in Belize and Uruguay to conceal earnings from image rights.