With the series tied at 1-1, the hosts were set 304 and Roston Chase made an unbeaten 101 - but they were all out for 202, Yasir Shah taking 5-92.
He claimed the final wicket with the last ball of the penultimate over.
It was Pakistan's eighth Test series in the Caribbean and marked the end of skipper Misbah-ul-Haq and record runscorer Younus Khan's Test careers.
Younus, 39, became the first Pakistan batsman to reach 10,000 Test runs in the opening match of the series and played 118 Tests.
Misbah, 43 at the end of this month, played 75 Tests - a record 56 as captain - with 26 wins, another Pakistan record.
After 14 wickets had fallen on the penultimate day, West Indies struggled to 93-6 in the 44th over. However, they were given hope when Jason Holder joined Chase at the crease and the pair had lifted their side to 151 when the captain fell to Hasan Ali in the 62nd over.
Chase, playing his 10th Test, recorded his third century with a boundary but then lost last man Shannon Gabriel, who edged on to his stumps when inexplicably attempting a slog to the boundary, to give spinner Yasir his 149th Test wicket and an 11th five-wicket haul in only his 26th match.
Pakistan secured their first Test series victory in the West Indies with a 101-run win in Roseau, Dominica.