She has agreed to continue serving through March 1, 2019.
The UNC Board of Governors met in an emergency session to discuss the matter.
"I've given it my all, made a lot of contributions," Spellings said Friday. "These are personal decisions. These are tough jobs, demanding jobs, three years is s a good run."
"The Board is grateful and appreciative to Margaret for her service, commitment, and dedication to the University and the state," said Harry Smith, Chair of the UNC Board of Governors. "Under Margaret's strong and capable leadership, we have worked together to achieve a lot of great things - keeping college affordable, holding ourselves and our institutions accountable, and getting the facts, data, and details we need to be world-class. Moving forward, we're focused on a healthy transition from President to Interim, a positive departure for the President, and continued progress on our shared goals and initiatives."
Spellings was with the university system for three years.
Before leading UNC, she was predominantly known for serving as Secretary of Education under President George W. Bush from 2005 to 2009.
Spellings is the second woman to lead the university system.
Her tenure was marked by large-scale battles and contentious issues, including students protesting against her hiring, the battle about House Bill 2, the so-called bathroom bill, and more protests in Chapel Hill about the Silent Sam Confederate statue on campus.
As part of her separation agreement, she is going to be paid out $500,000 and is receiving another $35,000 to relocate.