Herman replaces Charlie Strong, who was fired earlier Saturday after a 16-21 record in three years at Texas.
"The opportunity to come back to Texas is a dream come true for me and my family, and I can't thank President [Greg] Fenves and [athletic director] Mike Perrin enough for providing me with this incredible opportunity," Herman said in a statement. "Longhorn football has been -- and always will be -- a national power, winning and playing for national championships with great pride and passion, supported by an unbelievable fan base."
He said he met with Fenves and Perrin overnight Friday and was "very impressed with their unified vision and commitment to football."
According to the Austin American-Statesman, Herman will receive a five-year deal worth $5 million annually, with escalators to more than $6 million in the final year of the deal. The university still owes Strong $10.7 million on his original five-year guaranteed contract.
Herman will be officially introduced at a news conference Sunday.
Houston acknowledged Herman's departure in a statement Saturday.
"In his short time in Houston, Tom Herman elevated the Houston Football program to new heights, and we are grateful for his contributions to our program," athletic director Hunter Yurachek said in the statement. "The entire University of Houston community wishes he and his family continued success in this new chapter in their lives."
Defensive coordinator Todd Orlando will coach the Cougars' bowl game, the school announced.
Herman's desire to take the Texas job has been one of the sport's worst-kept secrets. He has Texas ties that go back to when he began his career as a Longhorns graduate assistant under Mack Brown (1999-2000).
Overall, Herman spent a decade as an assistant coach in the state, including stops at Texas Lutheran, Sam Houston State, Texas State and Rice. He received a master's in education from the University of Texas in 2000. He also has strong ties to the high school coaches in the state and landed the highest-ranked prospect ever to a Group of 5 school when he signed defensive tackle Ed Oliver from Houston's Westside High.
Before joining the Cougars, Herman oversaw one of the nation's most potent offenses as the offensive coordinator and quarterbacks coach under Urban Meyer at Ohio State from 2012 to 2014, when he won the Broyles Award as the nation's top assistant coach.
"In Tom Herman, Longhorn football is getting a proven competitor, terrific recruiter, and committed mentor of student-athletes who has shown his ability to succeed at all levels," Fenves said in a statement. "Tom was the hottest young head coach in the country the past two seasons, and I am thrilled we are able to get him back to UT to lead Texas football."
Strong said Texas is in a good position to win next year.
"The foundation has been laid here," he said Friday. "The thing is, we've been building it for three years. Even when I looked at it, I said the third year we'll make progress, the fourth year will be our year.
"It's just like baking a cake. The cake has been baked. The only thing you need to do now is put the icing on it and slice it. That's what this team is. The cake has been baked. Now it's just ready to be sliced."
In 2015, Herman led Houston to its first New Year's bowl in 30 years, its second 13-win season in program history and its 11th conference championship in program history by claiming the inaugural American Athletic Conference championship. He led all FBS coaches in their first year with a program with 13 wins, as Houston finished third nationally with a 92.9 winning percentage at 13-1. This season Houston is 9-3.
The Cougars were 6-0 against ranked teams during Herman's tenure.
"I want to thank the University of Houston, the administration, the fans and especially the players for an unbelievable two years," Herman said. "My family and I will be forever grateful."
ESPN staff writer Heather Dinich and The Associated Press contributed to this report.