Kohli's dismissal, as early as the 20th over of the chase, after another opening failure - one that saw Ajinkya Rahane coming in for Shikhar Dhawan - was the body blow to India's chances.
Left-arm spinner Ravindra Jadeja sent both the openers back in quick succession but Bairstow, brought into the side for the injured Joe Root, and captain Eoin Morgan kept England flowing with an 84-run stand for the third wicket. Upon the completion of the 3-match series against England, which they won 2-1, India will not be playing any more ODIs before the ICC event begins in June.
With India in trouble at 25 for three, Yuvraj (150 off 127 balls) and Dhoni (134 off 122) joined hands to forge a 256-run partnership to put their team in a position of strength from a precarious one.
England opener Jason Roy continued his fine form as he scored his eighth ODI half-century and his third of the three-match series. India won that series 2-1.
It was another 300-plus affair as the three-match series went into the record books with a total of 2090 runs that eclipsed the 1892 scored in the Afro-Asia Cup in 2007.
India have made one change to their side which defeated England in the first ODI on Sunday at Pune.
Dhoni had a relatively sedate start, seeing out two maidens before boosting his confidence with a couple of boundaries. Ben Stokes, who was hit for four sixes off the last over by Carlos Brathwaite during the World T20 final, conquered the death-bowling demons to finish with 3 for 63, while Chris Woakes and Jake Ball took two wickets apiece to restrict India to 316 for 9.
The pair batted with intent as Stokes smashed an unbeaten 57 off just 39 balls, including two sixes, while Woakes bludgeoned an unselfish 24 from just 19 balls as England finished their innings on a very competitive 321-8.
It won't be surprising if Sam Billings is given the responsibility of opening the innings. Pandya batted with Jadhav until the 46th over, reducing the equation to 45 from 27 balls, but the team fell short in the last over. KL Rahul (11) too disappointed when his attempt to play a non-existent pull resulted in a top-edge after he had raised hopes with a six and four. But Stokes, with some brutal hitting, and Woakes, with clever placement of the ball, hit 73 in 6.4 overs and gave England what turned out to be a winning total.
It was then that Morgan rose to the occasion with an exemplary showing as he put on 93 runs for the sixth wicket with Moeen Ali (55) to keep the chase alive. "We weren't at our best today with the ball and to bowl to Dhoni and Yuvraj with the bats these days and the five men inside the circle is never easy", he said.