
Mr Bolsonaro was found guilty of abusing his power ahead of last year's presidential poll.
He had been accused of undermining Brazilian democracy by falsely claiming that the electronic ballots used were vulnerable to hacking and fraud.
Mr Bolsonaro's lawyers are expected to appeal against the verdict.
They have argued that his statements had no bearing on the election result.
The ban is backdated to 2 October 2022, when the presidential election took place.
If the verdict is allowed to stand, Mr Bolsonaro will not be eligible to take part in the next presidential election in 2026, but will be able to run again in 2030.
He will also be barred from municipal elections due in 2024 and 2028.