The 66-year-old is being evaluated for possible emergency surgery for an intestinal obstruction, his office said.
Mr Bolsonaro was admitted to the Armed Forces Hospital in Brasilia early in the morning so doctors could examine his persistent hiccups.
He was “feeling well,” according to an initial statement.
Hours later, the president’s office said Mr Bolsonaro was being transferred to Sao Paulo, where he will undergo tests to evaluate the need for emergency surgery.
Mr Bolsonaro suffered damage to his intestines and serious internal bleeding after he was stabbed in the abdomen during the 2018 presidential campaign. He has since gone through several surgeries, some unrelated to the attack.
In recent weeks, Mr Bolsonaro appeared to struggle with speaking and he explained he was suffering from hiccups "24 hours a day”.
He said in an interview with Radio Guaiba on July 7: “I apologise to everyone who is listening to me, because I’ve been hiccuping for five days now."
He suggested some medications prescribed after dental surgery might be the cause.
During his weekly Facebook Live session the next day, Mr Bolsonaro apologised again for not being able to speak well due to week-long hiccups.
Mr Bolsonaro has been criticised for his handling of the Covid-19 pandemic, with Brazil topping 500,000 coronavirus deaths last month.