Earlier, Shahid Afridi [ Images ] smashed 56 not out from 26 balls to lift Pakistan to 272 for seven in 50 overs, after good knocks from captain Inzamam-ul-Haq [ Images ] (68) and opener Salman Butt [ Images ] (61).
Following a mid-innings rain delay of just over half an hour, Australia's victory target was revised to 253 in 45 overs.
Twice World Cup winner Lehmann hit the winning runs with two overs to spare at Bellerive Oval in Hobart as the home side reached 253 for six in 43 overs.
Australia had appeared in some trouble at 186 for five in the 33rd over but Lehmann combined with wicketkeeper Brad Haddin [ Images ] (30) for a steadying 57-run partnership.
Butt struck eight boundaries but the left-hander mis-timed an attempted cut off left-arm spinner Brad Hogg [ Images ] to be caught at backward point.
Yousuf Youhana fell to Michael Kasprowicz's bowling for 30 after putting on 74 runs with Inzamam. Kasprowicz followed up by trapping Inzamam lbw at 204 for six in the 44th over.
However, the 24-year-old Afridi helped Pakistan plunder 62 runs from their last five overs.
Afridi, who holds the world record for the fastest one-day international century with a 37-ball hundred against Sri Lanka [ Images ] in 1996, stunned Lee with a square drive for six in the 46th over.
The right-hander, who has three one-day international centuries to his credit, then struck McGrath (2-54) for consecutive sixes over cover and mid-wicket in the next over.
Afridi, who also hit four fours, recorded his fourth six when he clubbed Lee (1-66) over cover in the final in front of a roaring crowd of 15,503.
In reply, Australia's makeshift opening combination of Clarke and Simon Katich [ Images ] (38) added 107 after replacing Matthew Hayden [ Images ] and injured wicketkeeper/batsman Adam Gilchrist [ Images ] who were rested for the match.
Spinner Afridi then removed Australia captain Ricky Ponting [ Images ] for six in the 20th over.
Following a rain delay of just over half an hour, Australia continued their middle-order slump, losing their first five wickets for 79 runs as they slipped to 186 for five.
Seamer Razzaq bowled Damien Martyn (11) and Symonds (nought).
Clarke, who hit 12 fours and a six in 96 balls, was the fourth wicket to fall when he holed out to long-on three runs short of his second one-day international century.
Australia beat West Indies [ Images ] by 116 runs in the opening match of the series in Melbourne [ Images ] on January 14. West Indies will play Pakistan in game three in Brisbane [ Images ] on Wednesday.
Salman Butt c Lehmann b Hogg 61
Kamran Akmal c Clarke b McGrath 5
Mohammad Hafeez [ Images ] c Hogg b Lee 0
Shoaib Malik lbw Symonds 31
Inzamam-ul-Haq lbw Kasprowicz 68
Yousuf Youhana c Martyn b Kasprowicz 30
Abdul Razzaq [ Images ] c Clarke b McGrath 12
Shahid Afridi not out 56
Azhar Mahmood not out 3.
Extras: (lb-1, w-4, nb-1) 6
Total: (for seven wickets, 50 overs) 272
Fall of wickets: 1-15, 2-30, 3-83, 4-117, 5-191, 6-204, 7-251
Did not bat: Rana Naved-ul-Hasan, Shoaib Akhtar [ Images ]
Bowling: McGrath 10-2-54-2, Lee 10-0-66-1 (nb-1, w-2), Kasprowicz 9-0-38-2, Symonds 9-0-55-1 (w-2), Hogg 7-0-28-1, Lehmann 5-0-30-0.
M.Clarke c Rana Naved-ul-Hasan b Mohammad Hafeez 97
S.Katich b Azhar Mahmood 38
R.Ponting c Kamran Akmal b Shahid Afridi 6
D.Martyn b Abdul Razzaq 11
D.Lehmann not out 49
A.Symonds b Abdul Razzaq 0
B.Haddin c Mohammad Hafeez b Rana Naved-ul-Hasan 30
B.Hogg not out 3.
Extras: (lb-5, w-6, nb-8) 19
Total: (for six wickets, 43 overs) 253
Fall of wickets: 1-107, 2-118, 3-141, 4-184, 5-186, 6-243.
Did not bat: B.Lee, M.Kasprowicz, G.McGrath
Bowling: Shoaib Akhtar 8-0-54-0 (nb-2, w-5), Rana Naved-ul-Hasan 8-0-60-1 (nb-1), Azhar Mahmood 6-0-33-1 (w-1), Shahid Afridi 9-0-43-1, Abdul Razzaq 8-0-41-2 (nb-5), Mohammad Hafeez 4-0-17-1.
Result: Australia won by four wickets. Their victory target was revised to 253 from 45 overs following a rain delay.
Man of the match: Michael Clarke.
Next match: Pakistan v West Indies, Brisbane, January 19.