His father Jorge Messi was also given a jail term, although neither is likely to spend any time behind bars as, under Spanish law, prison sentences of less than two years can be served under probation, reports the BBC.
Three counts of fraud
The footballer and his father were found guilty of three counts of tax fraud on Wednesday by the court in Barcelona, where he has played football since 2001.
In addition to the prison sentences, Lionel Messi was fined around €2m and his father €1.5m for using tax havens in Belize and Uruguay to conceal earnings from image rights.
Both made a voluntary €5m “corrective payment” in August 2013, which was equal to the value of the unpaid tax plus interest.
Image rights
The income relates to the use of Messi’s image in contracts with Danone, Adidas, Pepsi, and Procter and Gamble among others.
The footballer has always denied knowing what was happening with his finances, which were being managed in part by his father.
The high court in Barcelona ruled in June 2015 that not knowing about his finances did not mean that Messi should be granted impunity.
Lionel Messi was also among those named in the Panama Papers scandal, which saw more than 11 million documents leaked from Panamanian law firm Mossack Fonseca.