Williams, who has spent the past 22 seasons at his alma mater and won the national title in 2002, made it official on Thursday afternoon.
"It’s the right time," Williams said. "My entire career has been an unbelievable blessing. I am fiercely proud of the program we have built here. I couldn’t have asked any more from my players, my assistant coaches, the great Maryland fans and this great university. Together, we did something very special here."
There will be an official press conference Friday afternoon. Assistant Robert Ehsan will serve as interim coach, sources said.
Williams has gone to 14 NCAA appearances in the past 18 seasons, including seven Sweet 16’s.
He has won 461 games in his tenure at College Park. The Terps were 19-14 this past season.
"Gary has been an iconic figure in the ACC," conference commissioner John Swofford said in a statement. "His resurrection of the Maryland program to national championship status was huge, not only for the University of Maryland, but the Atlantic Coast Conference as well. His long term consistent success is what I admire the most about Gary. His accomplishments are of Hall of Fame caliber."
Williams began his head coaching career at American before spending four seasons at Boston College and three at Ohio State.
His career coaching mark is 668-380 in 33 seasons.