The White Sox announced the moves Tuesday night.
"This is an incredibly difficult decision for me to make because they are both talented individuals with long-term relationships at the White Sox," team owner Jerry Reinsdorf said in a news release. "Ken is like a son to me, and I will always consider him a member of my family.
"I want to personally thank Ken and Rick for all they have done for the Chicago White Sox, winning the 2005 World Series and reaching the postseason multiple times during their tenures. I have nothing but the greatest respect for them as people and appreciate the commitment and passion for the White Sox they exhibited over the years."
Williams originally joined the White Sox in 1992 as a scout. He went on to serve as as director of minor league operations, vice president of player development and vice president.
Hahn joined the franchise in 2000 and also worked as an assistant general manager. The White Sox won the 2005 World Series, 2008 American League Central title and went to the playoffs five times under Williams and Hahn.
The White Sox went to the playoffs just three times over the last 17 seasons. They went 93-69 in 2021, but followed with an 81-81 season in 2022. The White Sox started 7-21 this season and sit at 49-77, 16 games behind the division leading Minnesota Twins (65-61).
"We have underachieved," Williams told MLB.com. "This is what happens."
The White Sox will host the Seattle Mariners (71-55) at 2:10 p.m. EDT Wednesday in Seattle. They lost five of their last six games and are 2-8 over their last 10.