Mason will be introduced at a news conference Saturday morning.
"I am so excited to be at Vanderbilt," Mason said in the release. "This university combines the best of what's good about college athletics and academics. We expect to be competitive and look forward to competing for an SEC East crown."
Mason, 44, has spent the past four seasons at Stanford, where academic requirements and recruiting challenges are similar to Vanderbilt. He joined former coach Jim Harbaugh's staff in 2010 as a defensive backs coach after serving in the same position with the NFL's Minnesota Vikings from 2007 to 2009.
He was promoted to co-defensive coordinator and associate head coach when David Shaw took over in January 2011. He has had complete control over the unit the last two years.
Stanford is expected to promote outside linebackers coach Lance Anderson to defensive coordinator, a source told ESPN's Joe Schad.
Mason replaces James Franklin, who left for Penn State on Jan. 11. Vanderbilt wrapped up its search in exactly a week, and athletic director David Williams said they are very happy with their search. Williams said they found the football world is aware of Vanderbilt's progress, resulting in lots of interest in the job.
"We talked to outside experts and did our own evaluations and the person that always seemed to be in the spotlight was the same person that was at the top of our list and that was Derek Mason," Williams said..
Mason takes over a program that is in much better shape than the last time Vanderbilt hired a coach in 2010. Franklin took over a program that had gone 4-20 over the previous two seasons. Now Vanderbilt is 24-16 over the past three seasons, and the Commodores are 16-4 over the past 20 games -- second in the SEC only to Alabama.
Vanderbilt also has won consecutive bowl games for the first time in school history and finished in the final Associated Press poll each of the past two seasons, including No. 24 for 2013. Vanderbilt hadn't finished in the final AP poll before Franklin arrived since 1948 under Red Sanders.
But a recruiting class that had been ranked in the Top 25 before Franklin left has been losing commitments left and right, forcing Mason to try and salvage a class before signing day Feb. 5.
Vanderbilt chancellor Nicholas Zeppos said they trust Mason to build on the work that has taken Vanderbilt football to "unprecedented heights."
"He embodies integrity, strategic thinking and a demonstrated commitment to success. He understands the important role that athletics plays in the life of a vibrant university, and that outstanding scholarly pursuits and top-notch sports are integral parts of the Vanderbilt experience," Zeppos said.
A fiery and energetic coach whose personality plays well with recruits, Mason has helped mold the Cardinal into one of the nation's best and most physical defenses.
Stanford allowed only 19 points per game last season, best in the offensive-oriented Pac-12 Conference and 10th nationally. The Cardinal also led the country with 44 sacks. Stanford has won the past two Pac-12 titles and is the only program to make a BCS bowl each of the last four years -- all during Mason's tenure.
"I am very excited for Derek; this is a great opportunity for he and his wife, Leighanne," said Stanford coach David Shaw. "Derek is a great teacher and motivator, but more importantly he is a man of high character. We wish him success."
Mason is a former cornerback at Northern Arizona and has been an assistant at various colleges the past 20 years, including stops at Ohio, New Mexico State, Saint Mary's, Utah, Weber State, Idaho State, Bucknell and San Diego Mesa College.
He has gained greater acclaim at Stanford for finding ways to slow down hurry-up offenses and read-option runs, especially against Pac-12 division rival Oregon, which Stanford has beaten the past two years. About a half-dozen NFL teams even sent coaches last summer to see Mason, who taught tutorials on his defensive schemes.
"We are so excited to be introducing him as our head football coach because we are confident he can build upon our successes on and off the field and that he will take us to the next level," Williams said.
Information from The Associated Press was used in this report.