The Supreme Court found that García Ortiz had unlawfully revealed details of the tax status of businessman Alberto González Amador, boyfriend of a senior conservative politician. BBC reported.
The court handed him a two-year ban from the post and a fine of €7,200 (£6,438). He must also pay €10,000 to Mr González Amador as compensation.
The trial of García Ortiz fuelled already acrimonious relations between the left-wing government of Prime Minister Pedro Sánchez and right-wing opposition.