The move confirmed Williamson's status as McCullum's long-term successor, with chief selector Bruce Edgar saying it would give the 24-year-old valuable experience in charge for five one-dayers and two T20 matches to be played in the United Arab Emirates.
Edgar said McCullum, along with pacemen Tim Southee and Trent Boult, would return to New Zealand to prepare for a series against Sri Lanka beginning on December 26.
"Managing players' workloads will be an important part of our summer's plans and this is simply an example of that," he said, stressing that the decision to rest the trio was taken before last week's death of Australian batsman Phillip Hughes, which rocked the entire team.
McCullum scored a double century as he led New Zealand to a resounding innings and 80 run victory over Pakistan to level a three-match Test series 1-1 on Sunday but said after the match that Hughes' death had overshadowed the win.
Hughes, 25, died on Thursday, two days after being struck by a bouncer while playing a domestic game at the Sydney Cricket Ground.