The company acted after it emerged last week that its director of comms Matthew Anderson is moving to become director of strategy for News Corporation's European and Asian operations.
Following the rejig, McWilliam becomes group director of corporate affairs. He will continue to oversee public affairs, but will also take charge of internal comms and the 'reputation and responsibility department', both of which are currently part of Anderson's remit.
McWilliam reports to chief executive Jeremy Darroch. He was previously director of corporate comms and policy, and before that deputy head of strategy. McWilliam joined Sky in April 2000 from the BBC where he was head of television strategy.
Meanwhile, Robert Fraser is promoted to director of corporate communications. He was previously head of corporate press.
BSkyB will look for a replacement to cover Anderson's other responsibilities, including consumer comms.
Anderson will join News Corp on 15 April, reporting to the Europe and Asia chairman and chief executive, James Murdoch.
His remit will cover marketing, comms, strategy, corporate and public affairs, and corporate responsibility. The corporate affairs team will report to him.
Anderson joined Sky - of which News Corp owns 39 per cent - as head of corporate affairs in 2005, replacing Julian Eccles, who is now head of comms at Ofcom.