Pakistan didn't lose a wicket until Jamshed was out for 112 in the 36th over, leaving his team on 224-1at Mirpur Sher-e-Bangla stadium.
India skipper Mahendra Singh Dhoni used eight bowlers but they struggled throughout the Pakistan innings after failing to make an early breakthrough.
Hafeez scored 105 off 113 balls and Younis Khan added 52.
Ashok Dinda finished with figures of 2-47 while Praveen Kumar took two wickets for 77 runs.