The announcement was made Tuesday by Texas A&M athletic director Scott Woodward.
"As we began our search ... we kept our focus on finding an elite basketball coach, a developer of talent, a tremendous recruiter, a tireless worker and someone who fits Texas A&M," Woodward said in a statement. "Buzz Williams is all that and more. I have no doubt that Buzz will take our basketball program further than ever before and will make Aggies everywhere proud. It is an exciting day as we welcome Buzz and his family back to Aggieland."
Williams had been considered the heavy favorite to replace Billy Kennedy since the end of last season and was essentially the only candidate for the Aggies once they parted ways with Kennedy last month.
Virginia Tech's season ended with a loss to Duke in the Sweet 16 last Friday, and Williams and A&M finalized a deal in the past few days.
"I am so humbled and honored to return home to Texas A&M, and proud to lead the Aggies," Williams said in a statement. "I'd like to thank Chancellor Sharp, President Young and Scott Woodward for this incredible opportunity. This is our home, and we are ready to join with the 12th Man to win championships, graduate our players and represent this world-class university with integrity."
Williams, who spent two seasons as an assistant coach at Texas A&M from 2004-2006, has been the head coach at Virginia Tech the past five seasons. He led the Hokies to three NCAA tournament appearances. Prior to taking over in Blacksburg, Williams led Marquette to five NCAA tournaments in six seasons, including three Sweet 16s and an Elite Eight run in 2013.
He is a native of Greenville, Texas, and he earned his Master's degree at Texas A&M.
Virginia Tech athletic director Whit Babcock said Williams left the Hokies' program "a lot better than he found it" and said the team was told early Wednesday morning.
"They just laid it on the line and all that, and now they've got to deal with a coach -- and in some cases, a father figure -- leaving, so it was hard," Babcock said of the team gathering. "But they respected Buzz and took it fine. It was just hard to watch."
Babcock said there was no timetable for naming a replacement and that no search firm would be involved in the process.
"I like supporting the coaches that we have than checking the market all the time," Babcock said. "It doesn't take too long to get up to snuff."
Kennedy was let go after eight seasons in which he went 151-116 with two NCAA tournament appearances.
The Associated Press contributed to this report.