Warner, whose previous high score was 253, hit an unbeaten 335 from 418 balls – the second-highest Test score by an Australian and 10th highest overall.
He passed Sir Donald Bradman and Mark Taylor’s mark of 334, before Australia declared their first innings on 589-3.
Pakistan were reduced to 96-6 at the close, trailing by 493 runs.
Warner, who was caught off a no-ball on 226 off the bowling of Musa Khan, hit 39 fours and a six. He scored 154 in the first Test last week,
Former opening batsman Matthew Hayden has the highest Test score by an Australian with his 380 not out against Zimbabwe in 2003.
West Indies great Brian Lara is the current world record holder with his unbeaten 400 against England in 2004.
It caps a remarkable turnaround for the former vice-captain who had scored just 95 runs in 10 innings in the summer’s Ashes series.
Australia resumed day two of the day-night Test on 302-1, with Warner and Marnus Labuschagne at the crease.
They put on another 67 runs before Labuschagne was bowled by Shaheen Afridi for 162, ending a partnership that had put on 361 runs – the second-highest of all time by Australian batsmen, behind only Bill Ponsford and Don Bradman’s 451-run stand against England at The Oval in 1934.
Steve Smith then made 36 to become the fastest batsman to reach 7,000 runs, beating a record which had stood since 1946.
He took a single off Muhammad Musa to reach 7,000 runs in his 126th innings, taking possession of a mark held for 73 years by England great Wally Hammond who reached the milestone in his 131st innings.
Matthew Wade was 38 not out with Warner when Tim Paine declared.
Left-arm seamer Mitchell Starc did the damage in Pakistan’s reply, taking 4-22 with Pat Cummins and Josh Hazelwood picking up a wicket apiece.