The hospital where the surgery will take place next Sunday said in a statement that Bolsonaro's surgeon was doing a routine checkup and detected an incisional hernia. The surgeon said the president's health is good.
Bolsonaro told reports Sunday that he would undergo surgery soon.
"It's a part of life," he said, choking up. Bolsonaro tweeted earlier that he would take about 10 days off to recuperate.
A presidential spokesperson said Bolsonaro was still planning to attend a meeting of leaders of Amazonian countries Friday in Colombia to discuss conservation efforts.
Bolsonaro was stabbed in the abdomen in September 2018 while being carried through a crowd during a campaign rally.
The man who stabbed him, Adelio Bispo de Oliveira, was absolved when a judge determined he was mentally ill and ordered him to be held indefinitely in a prison mental institution.