His father, Jorge Messi, was also given a jail term for defrauding Spain of €4.1m (£3.5m; $4.5m) between 2007 and 2009.
They also face millions of euros in fines for using tax havens in Belize and Uruguay to conceal earnings from image rights.
However, neither man is expected to serve time in jail.
Under the Spanish system, prison terms of under two years can be served under probation.
The footballer and his father were found guilty of three counts of tax fraud in Wednesday's ruling by the court in Barcelona.
As well as the jail terms, Messi was fined about €2m and his father €1.5m. They made a voluntary €5m "corrective payment", equal to the alleged unpaid tax plus interest, in August 2013.
The sentence can be appealed against via the Spanish supreme court.
"FC Barcelona expresses its full support to Leo Messi and his father in relation to the conviction for tax fraud...
"The club... considers that the player, who has corrected his position with the Spanish tax office, is in no way criminally responsible with regards to the facts underlined in this case."
Le successeur de Joe Thsupula à la tête de la sélection nationale est connu. Il s’agit du Brésilien Joaquim Francisco Filho. C’est le président de la Mauritius Football Association, Samir Sobha, qui a confirmé la nouvelle.
4 years, 2 months ago
One year into a sweeping corruption scandal at the highest levels of global soccer, FIFA’s reputation and finances are still under a cloud. Some 150 miles away, though, the forecast is very different for UEFA, the most important regional soccer body under the FIFA umbrella.
5 years, 4 months ago