The five-year, $18 million deal is pending approval from Colorado's Board of Regents, according to a statement released by the school.
Dorrell, who coached the Dolphins' receivers, will succeed Mel Tucker, who left the Buffaloes to become the head coach at Michigan State.
"I'm excited to be back, it's like coming home," said Dorrell, who was CU's offensive coordinator and wide receivers coach from 1995 to '98 and the receiver coach from 1992 to '93. "The thing that excited me about this job is that my experience in the past here for the most part has been very successful. We had a lot of good teams, went to a lot of good bowl games. It's a top caliber program that has a lot of potential, and I'm excited to return it to that level."
Dorrell was the head coach at UCLA from 2003 to '07, during which he led the Bruins to five bowl appearances and amassed a record of 35-27. He was fired at the end of the '07 season despite the Bruins' reaching a bowl game.
Earlier this week, Kansas City Chiefs offensive coordinator Eric Bieniemy, a star running back at Colorado from 1987 to '90, withdrew his name from consideration for the job, ESPN confirmed.
Steve Sarkisian also withdrew his name from consideration and instead plans to remain at Alabama as offensive coordinator, sources told ESPN
Dorrell, 56, returns to college after spending the past five seasons as receivers coach for the Jets (2015-18) and Dolphins (2019). His last college coaching job was in 2014, when he served as Vanderbilt's offensive coordinator.
The Dolphins gave Dorrell a promotion this week, adding assistant head coach to his title, but Dorrell has been looking for an opportunity to return to being a head coach.
Dorrell quickly earned the respect of his Dolphins receivers last season and played a key role in DeVante Parker's breakout 2019 season.
Parker, who finished in the top five among NFL players with 1,202 receiving yards last season, credited Dorrell for teaching him how to watch film better and learn the subtleties of the position and trusting him to succeed.
"I am excited that Karl Dorrell has agreed to become our head football coach," athletic director Rick George said in a statement Sunday. "Karl has had great success as a college coach, both as a head coach and an assistant, and he knows the Pac-12 Conference and West Coast well. It was important that our next coach have CU ties, and Karl has those ties having worked at CU twice previously. Karl shares my passion for Colorado and our vision for winning championships. He will be a tremendous mentor and role model for our student-athletes, and he will provide great leadership for our program going forward."
George has asked the Board of Regents to approve a five-year contract that includes a starting base salary of $3.2 million with annual increases of $200,000. Also, George is proposing a salary pool of $3.8 million for assistant coaches, up from $3.155 million for Tucker's staff.
Colorado's search focused on coaches with NFL ties. After reaching out to Bieniemy, the school also spoke with New York Giants assistant Bret Bielema, the former Arkansas and Wisconsin coach, and had significant interest in Baltimore Ravens offensive coordinator Greg Roman, a source told ESPN's Adam Rittenberg.
The school also spoke with Sarkisian and Air Force coach Troy Calhoun, both of whom spent time in the NFL.
Darrin Chiaverini had been serving as Colorado's interim head coach.
Information from ESPN's Cameron Wolfe and The Associated Press was used in this report.