The university announced on Thursday that the retired general will join the school in the fall to teach classes and mentor ROTC members.
Petraeus, who has a doctorate from Princeton, left the CIA in November after acknowledging an extramarital affair with his biographer.
In March, he gave the keynote address at USC's annual dinner for veterans and ROTC students. It was his first public speech since resigning.
This is Petraeus' second teaching post. It was announced last month that he will be a visiting professor at the City University in New York.
At USC, Petraeus will hold the title of Judge Widney Professor, which is named for the university's founder and is reserved for eminent teachers.
The Associated Press contributed to this report.