Williams, 30, who won gold at the 2012 European Championships and bronze at the Delhi Commonwealth Games in 2010, and was co-captain of the Wales squad In Glasgow, said he was "utterly devastated" at the news.
"UK Anti-Doping can confirm the provisional suspension of athlete Rhys Williams after being charged with committing an anti-doping rule violation under the IAAF Anti-Doping Rules," UKAD chief executive Andy Parkinson said in a statement in response to an announcement by Team Wales.
"The athlete has the opportunity to respond to the charges against him, and to have those charges determined at a full hearing before the National Anti-Doping Panel.
Blake suffers shock defeat as Simbine takes gold in 100m
"UK Anti-Doping will not be making any further comment."
Williams, the son of former Wales and British and Irish Lions rugby winger JJ Williams, failed an in-competition test at the Glasgow Grand Prix event on July 11 and has been given a mandatory provisional suspension from all competition.
He said he had not knowingly taken a banned substance.
"I am utterly devastated about the news of this anti-doping rule violation, which has come as a great shock to me," Williams said in a statement.
"From the outset, I would strongly like to state that I have not knowingly taken any banned substance.
"As a professional athlete, I have always supported and have been an advocate of clean sport."
Williams said he would fully co-operate with UKAD.
"To be named Co-Team Captain for the Welsh Athletics Team was a great honour and I am distraught that I won't be able to fulfil this role and join them as part of Team Wales.
Welsh 800m runner Gareth Warburton was provisionally suspended this month for an anti-doping violation, ruling him out of the Games.
Welsh Olympic silver medal-winning boxer Fred Evans had his accreditation refused after an investigation by the Home Office and Games officials.
Gemili pulls out of Commonwealth Games 100m final with injury
Scott upsets Chalmers to win 100m freestyle title