He also called for an end to the “cancer of corruption”, saying it took money away from development .
Mr Obama made the comments in the first ever address by a US leader to the 54-member AU at its headquarters in the Ethiopian capital, Addis Ababa.
The address marked the climax of Mr Obama’s five-day trip to Africa.
He visited Kenya and Ethiopia, the headquarters of the AU.
Mr Obama said African leaders should respect their constitutions, and step down when their term ends.
“Nobody should be president for life,” he said.
Mr Obama said that democracy existed in name but not in substance when journalists were jailed and activists were threatened.
Corruption was “draining billions of dollars” from Africa, he added.
The money could be used to build schools and hospitals, Mr Obama said.