The win gave Australia an unbeatable 2-0 lead in the series with the final match set for Abu Dhabi on Sunday.
Friday's win also ensured that Australia has not lost a one-day series against Pakistan since losing 2-1 at home in 2002.
Maxwell made Pakistan pay heavily for dropping him on 2 and combined in a match-winning 85-run fourth wicket stand with captain George Bailey (28) to guide Australia to 217-5 in 43.2 overs.
Pakistan had earlier spoiled a terrific opening century-stand between Sarfraz Ahmed and Ahmed Shehzad to get bowled out for 215.
"Bowlers did a wonderful job to drag it back after Pakistan's start," Bailey said. "(A total of) 220-230 was a good score on that wicket but a couple of nice partnerships nicely finished it."
Bailey struggled against the spin trio of Zulfiqar Babar (2-52), Shahid Afridi and Raza Hasan, but hung in with Maxwell to revive the run-chase after Pakistan got a sniff at 72-3.
Maxwell dominated the bowlers and hit nine fours and a six that included couple of his trademark reverse swept fours before he skied a catch off a slog sweep with Australia needing 38 runs for victory.
"Today I came in a different situation with the ball spinning and I just tried to play to the situation and get close to the total," Maxwell said.
James Faulkner (26 not out) and Brad Haddin (17 not out) then guided Australia home without much problems.
Earlier, Ahmed top scored with 65 off 72 balls and Shehzad made 61 off 82 deliveries in Pakistan's first opening-wicket century stand in ODIs for 21 months. After putting 126 together off 151 balls, both openers fell to loose shots in successive overs.
Thereafter, Pakistan never got any momentum, as it lost its last eight wickets for 85 runs and was bowled out in 49.3 overs.
Captain Misbah-ul-Haq, who won the toss, continued his lean batting form with 15, and was one of three batsmen to be run out.
"Had we batted normally it would have been 250 (total) which could have been defended, but then we played some irresponsible shots and run-outs cost us too," Misbah said.
Johnson, who removed Ahmed, went on to claim the key wickets of big-hitters Umar Akmal and Afridi cheaply as Pakistan kept on losing wickets with regular intervals.
Pakistan surprisingly didn't tinker with its struggling batting lineup, and didn't give chances to either Sohaib Maqsood or Umar Amin, who was supposed to take the place of dropped batsman Younis Khan for the series.
Shehzad raised his half century with his fifth boundary when he cut offspinner Nathan Lyon to the point boundary, and Ahmed followed his teammate by completing his maiden half century in his 28th ODI with four boundaries and a six.
Shehzad got a lucky escape on 51 when Bailey dropped a sitter at mid off, and one run later the batsman successfully overturned the onfield umpire's leg before decision off Lyon.
Left-arm spinner Xavier Doherty, who replaced Sean Abbott in Australia's playing XI, broke through when Shehzad pulled a short delivery straight to Steven Smith at midwicket, and Johnson returned to have Ahmed caught at point in the next over.
Asad Shafiq looked to be shaping up well with 29 before he, too, threw away his wicket while attempting a big shot and gave a simple catch to Johnson at mid off.
Fawad Alam remained unbeaten on 20 off 39 balls, hitting a solitary boundary, as wickets kept falling around him until last man Mohammad Irfan was run out.
"We want to bat well, otherwise it's difficult to win by scoring 160 and 200 runs against a top quality side," Misbah said.