The tourists, chasing a Duckworth-Lewis target of 275 in 45 overs, fought back after being 106-5 to scrape home off the penultimate ball of the match in Hambantota.
Maqsood remained unbeaten on a glorious 89 off 73 balls as Shahid Afridi smashed the winning boundary off seamer Nuwan Kulasekara to the point fence.
Alam was dismissed for 62 by Lasith Malinga when 22 still remained for victory off the last three overs, but Maqsood and Afridi battled on to help Pakistan record a good win.
Opener Ahmed Shehzad scored 49 but no other top-order batsman settled in to make a big score till Maqsood and Alam turned the game Pakistan's way.
"This is one of the best partnerships I have seen, especially by two young batsmen," Pakistan captain Misbah-ul Haq said. "We lost our way a bit, but Fawad and Maqsood made a good recovery."
The 27-year-old Maqsood, who was named man of the match, said the plan was for him to attack, while Alam rotated the strike.
Earlier, Sri Lankan skipper Angelo Mathews smashed 89 off 85 balls and Mahela Jayawardene made 63 to give their side a seemingly commanding total.
Jayawardene, 37, who retired from Tests earlier this week to concentrate on one-day cricket till next year's World Cup, hit eight boundaries in his 73rd half-century in the shorter format.
You’ve reached your limit of {{free_limit}} free articles this month.
Subscribe now for unlimited access.
Already subscribed? Log in
Subscribe to read the full story →
Smart Quarterly
₹900
3 Months
₹300/Month
Smart Essential
₹2,700
1 Year
₹225/Month
Super Saver
₹3,900
2 Years
₹162/Month
Renews automatically, cancel anytime
Here’s what’s included in our digital subscription plans
Exclusive premium stories online
Over 30 premium stories daily, handpicked by our editors


Complimentary Access to The New York Times
News, Games, Cooking, Audio, Wirecutter & The Athletic
Business Standard Epaper
Digital replica of our daily newspaper — with options to read, save, and share


Curated Newsletters
Insights on markets, finance, politics, tech, and more delivered to your inbox
Market Analysis & Investment Insights
In-depth market analysis & insights with access to The Smart Investor


Archives
Repository of articles and publications dating back to 1997
Ad-free Reading
Uninterrupted reading experience with no advertisements


Seamless Access Across All Devices
Access Business Standard across devices — mobile, tablet, or PC, via web or app
