He appeared during a live broadcast and chuckled as he told viewers that he had "mould" in his lungs.
The leader said: "I just did a blood test. I was feeling kind of weak yesterday. They found a bit of infection also.
"Now I'm on antibiotics."
Mr Bolsonaro added: "After 20 days indoors, I have other problems. I have mould in my lungs."
He spent nearly three weeks in isolation at the presidential palace after being diagnosed with the coronavirus on 7 July.
He tested negative for the virus last Saturday but his wife Michelle, 38, tested positive on Thursday.
Mr Bolsonaro, 65, gave no further details about his infection.
Even after he was infected, the politician - who has previously dismissed the disease as a "little flu" - downplayed the severity of the virus.
He has regularly said that restrictions on businesses will be more damaging than the illness, but most Brazilians disagree with his approach, according to recent opinion polls.
Meanwhile, Brazil's science and technology minister Marcos Pontes, 57, has become the latest politician and the fifth cabinet minister to announce he has the coronavirus.
On Thursday night, Brazil's health ministry confirmed a total of 2,610,102 cases of coronavirus, up from 2,552,265 the previous day.
Some 91,263 people have died in the country after testing positive for the disease.