Azam became just the seventh batsman in one-day cricket to smash hundreds in three consecutive matches with a superb 106-ball 117 to lead Pakistan to 308-6 after Ali won the toss and decided to bat on a flat Sheikh Zayed Stadium pitch.
Azam was finally bowled by Kieron Pollard in the 46th over after hitting eight boundaries and a six in another dominating exhibition of batting.
Ali, who failed in the first two games with a first-ball duck and nine, scored a 109-ball 101 with eight boundaries and a six.
Left-arm spinner Sulieman Benn provided West Indies with the first breakthrough, in his second over, when Sharjeel holed out at long-on after hitting five boundaries off 41 balls.
More From This Section
Ali and Azam added 147 for the second wicket to frustrate the West Indian bowling before Ali was bowled by Jason Holder in the 39th over.
Sarfraz Ahmed made 24 not out as Pakistan managed 96 runs in the last 15 overs.
Pakistan's Zaheer Abbass and Saeed Anwar, South Africa's Herschelle Gibbs, AB de Villiers and Quinton de Kock, and New Zealand's Ross Taylor are others to achieve the milestone.