Williams is leaving following more than 14 years in the job, after taking a voluntary severance package.
The source added that the severance package came amid wider cost-cutting by the Scottish Government in an effort to make it more 'lithe'.
Previously, Williams spent time working for the Department of Trade and Industry and Clydesdale Bank.
Andrew Baird, to whom Williams reported, will continue to lead the Scottish government's comms team.
The news comes as the marketing services framework agreement review, covering the Scottish Government as well as Visit Scotland, among others, reaches its conclusion.
Renewed every four years, the framework will see agencies in the fields of marketing comms, PR, digital, research, design, direct marketing and events management shortlisted for inclusion.
The tender is being led by Scottish ministers acting through the Central Government Centre of Procurement Expertise.
The estimated total value of the framework is £80-£100m.