In Australia's first tour of Pakistan in 24 years, they managed just four wickets across the whole game as Imam, Azhar Ali and Abdullah Shafique notched up ton-plus scores.
Meanwhile, the Baggy Green's top order of Usman Khawaja, David Warner, Marnus Labuschagne and Steve Smith were all unable to hit three figures.
The game was ultimately dominated by the bat so it is not the biggest surprise.
The hosts controlled the first day of the historic Test match as they headed into day two with a score of 245 for one and Imam unbeaten on 132.
The 26-year-old was eventually caught lbw for 157 by Pat Cummins but it was Ali who took the biggest score of the game as he hammered 15 fours and a trio of maximums on his way to 185 before he nicked Labuschagne straight into the hands of Cameron Green.
Captain Babar Azam (36), Mohammad Rizwan (29) and Iftikhar Ahmed (13) all made contributions before the home side declared with an hour to go as they reached 476 for four.
The tourists survived until stumps on day two before bad light stopped play but responded in similar fashion to the home side's opening pair as Khawaja and Warner put on an opening stand of 156 before Sajid Khan clean bowled Warner for 68.
Khawaja came within inches of reaching his ton but was removed on 97 when he was caught by Imam from the bowling of spinner Nauman Ali.
Labuschagne (90) and Smith (78) both fell short of three-figure contributions before Australia were eventually bowled out for 459 and trailing by 17 runs.
Shafique (136 not out) celebrated his maiden test century and Imam (111) became the 10th player in Pakistan history to score a ton-plus score in both innings as the openers helped the hosts to an unbeaten stand of 252 before the two sides shook hands to signal the draw.
The opening partnership between the pair was Pakistan's highest ever against Australia but the game ended in a tame draw to kick off the three-match Test series and the sides meet again in Karachi on March 12.