Littrell and the Tar Heels are in their first ACC title game Saturday against Clemson.
Littrell, 37, has been at UNC the past two seasons. Before joining the Tar Heels, he was an offensive coordinator at Indiana (2012-13) and Arizona (2009-11). He also was an assistant at Texas Tech from 2005 to 2008.
He was one of two finalists for the North Texas job, along with TCU co-offensive coordinator Doug Meacham, a source said.
Littrell, a 2001 Oklahoma graduate. replaces Dan McCarney, who was fired midway through this season after an 0-5 start and 22-32 record with the Mean Green.