Magill was one of three presidents of top universities who were criticized after they testified at a congressional hearing about a rise in antisemitism on college campuses following the outbreak of the Israel-Hamas war.
She has agreed to stay on until an interim president is appointed, Scott Bok, chair of the Philadelphia-based university's board of trustees, said on Saturday.
"I write to share that President Liz Magill has voluntarily tendered her resignation as President of the University of Pennsylvania. She will remain a tenured faculty member at Penn Carey Law," Bok said.
Magill, Harvard University President Claudine Gay, and Massachusetts Institute of Technology President Sally Kornbluth all testified before a U.S. House of Representatives committee on Tuesday.
They have been criticized by their schools' Jewish communities for their handling of clashes between pro-Israel and pro-Palestinian demonstrators since the Islamist group Hamas attacked Israel on Oct. 7. That attack prompted a massive counterattack by Israel.
(Reporting by Kanishka Singh in Washington; Editing by Cynthia Osterman and Jonathan Oatis)