"They're destroying and undermining businesses and opportunities in their own communities that rob jobs and opportunity from people in that area," he added.
The public comments are Obama's first since violence began in Baltimore on Monday afternoon and continued overnight -- following nearly 200 arrests and roughly 150 fires, according to the Baltimore mayor’s office.
Fifteen police officers have been injured since Monday, with six hospitalized. It is not clear how many rioters have been injured.
The president noted that recent incidents of the use of excessive force by law enforcement officers around the country "raise troubling questions."
He said police departments and local communities have to do some "soul searching."
"We as a country have to do some soul searching," Obama added. "This is not new. It's been going on for decades."
Some 500 National Guardsmen were deployed to the city after Maryland Gov. Larry Hogan declared a state of emergency. The violence began after a week of peaceful protests in Baltimore after Gray’s death.