Its troops had played a key role in weakening the al-Qaeda-linked al-Shabab group in Somalia, Mr Obama said.
He was speaking after talks with Ethiopia’s Hailemariam Desalegn, during the first ever visit by a US president to the Eastern African state.
He also called on Mr Hailemariam to improve Ethiopia’s record on human rights and good governance.
“I don’t bite my tongue too much when it comes to these issues,” he said at a joint press conference.
Some rights groups have criticised Mr Obama’s visit to Ethiopia, warning that the trip could lend credibility to a government accused of jailing journalists and critics.
Amnesty International’s Abdullahi Halakhe said: “We don’t want this visit to be used to sanitise an administration that has been known to violate human rights.”
Mr Obama will also be the first US leader to address the 54-member African Union in Ethiopia’s capital, Addis Ababa, on Tuesday.
Compared to the Kenyan leg of his tour, President Obama’s arrival in Ethiopia signals a more sombre mood.
But despite security ties, Mr Obama raised concerns about what critics say is the erosion of democratic freedoms in Ethiopia.
Recent elections in which the ruling party secured all of the parliamentary seats, and a further clampdown on the media and the jailing of bloggers, are among the issues rights groups expected the US president to raise.
In talks on South Sudan with leaders from Ethiopia, Kenya and Uganda as well as the Sudanese foreign minister, he is expected to call for tougher sanctions and a possible arms embargo if the warring factions do not agree on a peace deal.
However, a US official travelling with Mr Obama said they were not expected to lead to a breakthrough.
“This is an opportunity to reinforce the effort that’s on the table and to strategise… on next steps in the event that it doesn’t succeed,” the official told reporters.
The 19-month war in South Sudan has left thousands of people dead and displaced more than two million.
Ethiopia’s ruling party, the EPRDF, and its allies won every single parliamentary seat in May’s elections. Opposition parties claimed the process was rigged.
A legal case currently being fought through the US courts alleges that agents of the Ethiopian government eavesdropped on the internet activities of a man in the US state of Maryland.
The man, born in Ethiopia and now a US citizen, works for a political opposition group outlawed in his home country.