After being put into bat, Australia also started poorly and was struggling to 57-4 before George Bailey came to the rescue with 87 off 91 balls.
He shared decent stands with Adam Voges (30) and Matthew Wade (36) but James Tredwell helped clean up the tail for figures of 3-53.
McKay ran amok at the start of his second over, Australia's third. He trapped Pietersen lbw for 5 before enticing nicks to the slip cordon off both Trott and Root, in the process becoming the 34th player to claim a hat trick in ODIs.
England captain Eoin Morgan (53) shared a 104-run stand for the fourth wicket with Carberry and Buttler continued the recovery but only after getting a reprieve on 8 when DRS showed the ball from Shane Watson going on to miss leg stump, overturning an lbw decision.