Ali's epic unbeaten 302 guided Pakistan to 579-3 declared before the West Indies closed the second day on 69-1, still needing another 311 to avoid the follow-on with opener Kraigg Brathwaite (32) and Darren Bravo, on 14 not out, fighting at the crease.
They lost Leon Johnson leg-before in leg-spinner Yasir Shah's second over for 15 but negotiated the pace-cum-spin attack well for 22 overs.
It was Ali who stole the limelight in this second ever day-night Test with a career-best score that was spread over 645 minutes of dominating batting, albeit on a flat Dubai stadium pitch.
It is only the third Test triple century against the West Indies, after Andy Sandham of England and late Pakistan great Hanif Mohammad, making Pakistan's 400th Test, and his own 50th, a memorable occasion.
In all Ali smashed 23 boundaries and two sixes and put on 215 for the opening wicket with Sami Aslam (90), 147 for the second with Asad Shafiq (67) and 165 with Babar Azam (69) for the third.
Ali said he was honoured to join the 300-league.
"It's a great achievement," said Ali. "It's a proud moment and feeling which I can't explain and I will remember this for the rest of my life.
"I had cramps yesterday but today I felt better and when I got a chance I thought I should grab it. The first target was 200 but 300 is a double joy and great honour."
Ali drove part-timer Jermaine Blackwood to the cover boundary to complete his triple century off 469 balls, pumped the air in jubilation and then did Pakistan's new style of salute and push-up celebrations.
Misbah, unbeaten on 29, signalled the declaration in an attempt to forge ahead in the three-match series.
Ali became the fourth Pakistan batsmen behind Hanif (337 vs West Indies in 1958), Inzamam-ul-Haq (329 vs New Zealand in 2002) and Younis Khan (313 vs Sri Lanka in 2009) to hit a triple hundred.
When on 278 Ali completed 4,000 Test runs, becoming the tenth Pakistani to reach the milestone in the five-day format.
Ali's knock as well as Pakistan's big total justified the decision to refine the seam on the pink ball used for this match after players complained of difficulties picking it up in the first-ever day-night Test between Australia and New Zealand at Adelaide last year.
A switch to a black seam, instead of the white and green one used at Adelaide, seemingly aided the batsmen considerably, with leg-spinner Devendra Bishoo (2-125) returning the best figures for a struggling West Indian attack.
(This story has not been edited by Business Standard staff and is auto-generated from a syndicated feed.)