Sachin Tendulkar extended his world record tally to 37 centuries as the Indians piled up a mammoth 610-3 before captain Rahul Dravid declared an hour before close on the second day.
Paceman Zaheer Khan then rocked Bangladesh with three wickets in nine balls, including one with his first delivery, as the hosts ended the day tottering at 58-5.
Saqibul Hasan (30) and Mohammad Sharif (0) were at the crease with Bangladesh still needing 353 runs to avoid the follow-on.
Tendulkar was unbeaten on 122 after six hours in the middle in stifling conditions, joining Wasim Jaffer (138), Dinesh Karthick (129) and Dravid (129) as the four century-makers for India.
It was Tendulkar's second hundred in the series following his 101 in the drawn first Test in Chittagong and moved him three clear of compatriot Sunil Gavaskar's previous record of 34 centuries.
Mahendra Dhoni cracked a quickfire 51 off 50 balls, studded with three boundaries and four sixes, to lift India past the 600-run mark and hasten Dravid's declaration.
India's total was the highest ever scored against Bangladesh, surpassing Australia's 581-4 at Chittagong in April last year.
Zaheer struck with the first ball when Bangladesh began their reply as Javed Omar edged a catch to Karthick at third slip.
New ball partner Rudra Pratap Singh had Bangladesh captain Habibul Bashar caught behind in the second over, before Zaheer bowled Shahriar Nafees and trapped Mohammad Ashraful leg-before off successive deliveries.
Left-handed Saqibl, playing only his second Test, prevented a hat-trick by driving Zaheer to the point boundary and added three more fours during his attractive knock.
Dravid, who started the day at 88 with India on 326-0, reached three-figures within the first 25 minutes of play.
He hit 15 boundaries and a six in his 24th Test hundred before he cut left-arm spinner Mohammad Rafique to Javed Omar at point 30 minutes before lunch.
It was Bangladesh's first success in the match after 108.2 overs in energy-sapping hot and humid weather.
On Friday, Wasim Jaffar and Karthick had put on 175 for the first wicket before both batsmen retired hurt with severe cramps and dehydration.
Karthick, who returned to bat at the fall of Dravid's wicket, reached his maiden Test century off the last ball before lunch.
The Tamil Nadu youngster, who turns 22 on June 1 and is playing his 13th match, finally fell midway through the afternoon session when he skied a pull off seamer Mashrafe Mortaza to mid-wicket.
Sourav Ganguly, who hit a century in the previous match, was the only batsman to fall cheaply when he was caught behind off Rafique for 15.
The first Test in Chittagong ended in a draw earlier this week after 15 of the scheduled 30 hours of play were lost due to bad weather.
Note: Mortaza went off the field after bowling four balls of his 10th over and Rasel completed the over. Rasel also went off after two balls of his 14th over and Sharif completed the over.