McGrath missed the first two Tests because of his wife Jane's battle with secondary cancer but returned for the third Test in Bridgetown, Barbados. Test cricket's sixth-leading wicket-taker failed to add to his tally of 422 victims as Australia completed a nine-wicket win on Monday to take a 3-0 lead in the four-Test series.
The final Test starts in Antigua on Friday.
Western Australia's Williams, 28, who has played six one-day
"With only one Test remaining in this series and limited selection opportunities, it made little sense for Brad to remain with the squad when he could return home to be with his young family," Australia chairman of selectors Trevor Hohns said in a statement on Tuesday.
Williams is scheduled to arrive home in Perth on Thursday, the ACB said.