He remained not out after scoring 205 off 364 deliveries to post the highest individual score by a Pakistani batsman in Australia.
The pair plastered the Australian attack in a beaten run-a-ball stand of 116 that the home side seemed incapable of stopping as the tourists looked to set up a declaration.
It was Azhar’s 12th Test century in his 56th Test and third against Australia and took his aggregate for the calendar year to 1,146 runs at 63.66.
It was also the fourth triple hundred by a Pakistani batsman.
Mohammad Amir was the only batsman out in the first session, caught down leg-side by wicketkeeper Matthew Wade off Mitchell Starc for 29 off 27 balls.
Amir, who cracked six boundaries in his breezy knock, put on 49 runs for the seventh wicket with Azhar .
Sohail Khan, brought in for Rahat Ali in the only change from the Gabba Test loss, belted four sixes off spinner Nathan Lyon, in a his belligerent cameo — his highest Test score off as many balls.