Florida announced McElwain’s appointment on Twitter.
"Coach McElwain was someone we targeted from the beginning of the search," Florida Athletic Director Jeremy Foley said in a statement. "The more we worked through the process and did our due diligence, coupled with our meeting and conversations with him and those around him, it was obvious he is the right person to lead the Florida Gator football program."
McElwain’s Rams finished this season with record of 10-2, including a nine-game win streak and a 6-2 record in the Mountain West Conference. Last season, Colorado State was 8-6, including a New Mexico Bowl win over Washington State -- the school’s first bowl appearance since 2008.
The deal to acquire McElwain, 52, had been reportedly held up by Colorado State's refusal to reduce the $7.5-million buyout stipulated in his contract. McElwain, 22-16 in three seasons at Colorado State, accepted the position at Florida on Thursday after that buyout was reduced, according to the Associated Press.
To obtain McElwain's release, Florida agreed to pay Colorado State $3 million over six years and to host the Rams for a game between 2017 and 2020. McElwain will also pay his former employer $2 million, according to Florida's website.
Muschamp, 28-21 as head coach of the Gators, lasted four seasons in Gainesville but could not survive back-to-back records of 4-8 and 6-5.
The school announced his departure in November, though Muschamp agreed to coach the team's final two games.
"They've got a good locker room and a bunch of talented players and a bunch of good kids," Muschamp said. "We've cleaned up the place and it's ready for somebody to go take the next step."
McElwain has served on the coaching staffs of Eastern Washington (1987-94), where he began his coaching career as a graduate assistant in 1985 after playing quarterback, Montana State (1995-99), Louisville (2000-02), Michigan State (2003-05), Fresno State (2007) and Alabama (2008-11), where he won two national titles as offensive coordinator/quarterbacks coach.
He also coached with the Oakland Raiders in 2006.
Follow Matt Wilhalme on Twitter @mattwilhalme