Pakistan slipped from 141 for no loss in the 24th over to 210 for six in the 41st as Ravindra Jadeja helped India make a comeback after being battered in the first half of the game.
Jamshed continued his good run with the bat and slammed a fluent 106, while Hafeez struck a brisk 76 to help Pakistan begin their innings on a strong note.
Jamshed completed his second consecutive century in the ODI series, hitting 12 boundaries and two sixes to score 106, which came from 124 balls.
Ravindra Jadeja provided India a much-needed breakthrough when he dismissed Pakistan opener Mohammad Hafeez for 76 in the 24th over, breaking a century stand of 141 runs for the first wicket.
The left-arm spinner took three wickets for 41 while Ishant Sharma bagged 3-34 as India bounced back strongly after a poor start in a crucial game.
Hafeez was cleaned up by Jadeja for a 74-ball 76. His knock included 10 hits to the fence.
Brief Scores: Pakistan 250 all-out in 48.3 overs (Nasir Jamshed 103, Mohammad Hafeez 76; Ravindra Jadeja 3 for 41, Ishant Sharma 3 for 34) vs India 96 for 5 in 27 overs (Virender Sehwag 31, Gautam Gambhir 11; Junaid Khan 2 for 18, Umar Gul 1 for 19)