Collins' deal at Florida is for three years, according to the source. He had signed a two-year extension worth $1.2 million in January and was scheduled to make $625,000 in 2015, according to the Jackson Clarion-Ledger.
Collins helped turn Mississippi State into one of the nation's top defenses. The Bulldogs rank 10th in scoring defense, allowing 19.4 points a game -- the 10th-lowest average in the FBS -- and lead the country in red-zone defense.
"His defenses have been successful everywhere he has been," McElwain said. "It was important to maintain some of the same philosophies and concepts that have made the defenses around here successful with this hire and our players will continue to progress under his direction."
Collins will replace D.J. Durkin, who will continue to coach the Gators' defense through the Birmingham Bowl against East Carolina.
The move will mark the latest in a massive coaching overhaul at Florida, which hired McElwain earlier this month to replace Will Muschamp.
McElwain, who coached Colorado State to a 10-2 record this season, has an offensive background. He served as Alabama's offensive coordinator for four years before becoming Colorado State's head coach.
The 43-year-old Collins began his coaching career as a graduate assistant in 1993 at Western Carolina, his alma mater. He also spent time at Franklin (N.C.) High School, Albright College, Georgia Tech, Alabama, UCF and Florida International. His big break came in 2007, when he served as Nick Saban's director of player personnel at Alabama.
That's where he crossed paths with McElwain, who was Saban's offensive coordinator between 2008 and 2011.
Collins joined Mississippi State in 2011 as co-defensive coordinator and was in full charge of the defense the past two seasons. In his first season, the Bulldogs ranked in the top five in the Southeastern Conference in total defense, rushing defense and passing defense.
Florida's defense was one of the nation's best under Muschamp. The Gators ranked eighth in total defense in 2011, fifth in 2012 and eighth last year. They rank 20th this season.
"I thought Geoff did a great job here and pleased with what he's done," Mississippi State coach Dan Mullen told reporters Tuesday. "Our psycho defense will continue to be a psycho defense on the field. That's our program, that's what we play here. Whoever the D-coordinator is, we're going to play that great defense."
The Bulldogs went 10-2 -- their first 10-win season since 1999 -- and will play Georgia Tech in the Capital One Orange Bowl.
Mississippi State will be looking for its fifth defensive coordinator in seven seasons under Mullen, who took what seemed to be a veiled shot at Collins for leaving for the same position at Florida.
"I hope our guys have opportunities to go be head coaches more than leaving for lateral positions," Mullen said. "But I think with success, hopefully we do have guys get opportunities to be head coaches."
Mullen has yet to name a replacement for Collins for the Bulldogs' game against Georgia Tech in the Orange Bowl.
The Associated Press contributed to this report.