"It would be a mistake for the United States, or Great Britain... to send in ground troops and overthrow the [Bashar al-] Assad regime," he told the BBC.
He also said he did not think so-called Islamic State would be defeated in his last nine months of office.
But he said: "We can slowly shrink the environment in which they operate."
Mr Obama, who has been in the UK for a three-day visit, said Syria was a "heart-breaking situation of enormous complexity".
"I don't think there are any simple solutions," he said.
"In order for us to solve the long-term problems in Syria, a military solution alone - and certainly us deploying ground troops - is not going to bring that about."
Mr Obama said the US-led coalition would continue "to strike ISIL (Islamic State) targets in places like Raqqa, and to try to isolate those portions of the country, and lock down those portions of the country that are sending foreign fighters into Europe".
But he said the international community would have to continue to apply pressure to all parties, including Russia, Iran and moderate opposition groups "to sit down at the table and try to broker a transition".
But he added: "That's difficult."
-BBC