One-drop batsman Babar knocked a fighting 133-ball 103 while Shadab scored a career best 52 not out to lift Pakistan from a struggling 79-5.
That was before Shadab the bowler returned with his best figures of 3-47 to dismiss Sri Lanka for 187 all out in 48 overs.
The 23-year-old Babar and Shadab, who turned 19 earlier this month, were engaged in a match-turning 109-run seventh wicket stand which helped Pakistan reach 291-9 on a sluggish Sheikh Zayed Stadium.
The victory gives Pakistan a 2-0 lead in the five-match series while this becomes Sri Lanka's ninth defeat in a row.
Sri Lanka will be looking to bounce back in the third ODI, and keep the series alive with a victory.
Pakistan vs Sri Lanka 3rd ODI will begin at 4:30 PM and will be played in Abu Dhabi. It will be a day and night fixture.
Pakistan vs Sri Lanka 3rd ODI will be broadcast live on Sony Ten network from 4:00 PM IST with the toss and subsequent coverage.
Pakistan vs Sri Lanka 3rd ODI will be live streamed on SonyLiv app and you can follow the ball-by-ball action Cricketnext.com.
First Published: October 18, 2017, 3:17 PM IST