Bangladesh captain Mushfiqur Rahim had also hit a sparkling hundred as the hosts posted a challenging 279 for seven after being asked to take first strike.
Kohli's 19th One-Day International hundred enabled India recover from the cheap dismissal of openers Shikhar Dhawan (28) and Rohit Sharma (21) early on, overhaul the target with six balls to spare, and register their first victory in the 2014 calendar.
The clinical win will give India much relief after the embarrassing showing on the tour of New Zealand.
They also avenged their last defeat to Bangladesh, which cost them a place in the final of the 2012 Asia Cup.
Rahane played a key role in the victory, batting with Kohli for 33 overs.
India were just 13 runs away from victory when Kohli was castled by pacer Rubel Hossain in the 46th over.
His 136-run knock came off 122 balls and included 18 boundaries and two sixes, while Rahane took 83 balls for 73, which was studded with seven fours and a six.
The only blot in Kohli's innings was a let-off when he was on 35. He flicked the ball uppishly to square leg but fielder Rubel could not reach to it.
Earlier, Rahim led from the front with a gritty 113-ball 117. The century came after he took a nasty hit on his ribs by a delivery from Varun Aaron.
It was the first century for Bangladesh against India since Alok Kapali's hundred in an Asia Cup in June 2008.
Young opener Anamul Haque (77) too impressed with a half-century in a 133-run third wicket partnership with his skipper.
Mushfiqur was grounded after being hit on the ribs by a nasty beamer from Aaron, but the diminutive captain showed enough resilience to complete his second ODI century.
The 25-year-old started his innings patiently, with Animul going freely at the other end, but after the opener's dismissal, the skipper came into his own, hitting two sixes and seven fours.
The duo was involved in a 133-run third-wicket partnership that came after Bangladesh were reduced to 49 for 2 in the 13th over.
Despite the big partnership, though, the lower order failed to fire against a side that boasts of a strong batting line-up.
Mohammad Shami was the pick of the Indian bowlers, scalping 4 for 50 from his quota while it was a flop show for Aaron, who gave away 74 runs before being barred after 7.5 overs for two waist high deliveries, one of which hit Mushfiqur.
A less than 7,000 crowd in a 17,000 capacity stadium, in Narayangonj district in the southern suburbs of Dhaka, did not exactly give it a home-like feel for Bangladesh, as India opted for a run-chase.
A disciplined Shami, who made the first breakthrough in the form of Shamsur Rahman (7) and Ashwin's first-ball wicket after a brilliant stumping by Karthik, reduced the hosts to 49 for 2 in the 13th over and for a moment it seemed like Bangladesh were playing away from home with the stadium not even half-filled.
But the young Anamul turned it around with an array of strokes in a sensible third-wicket partnership with Mushfiqur as the duo posted individual fifties.
Some mindless bowling by India's third pacer Aaron, who chose raw pace over disciplined length, did not help the side's cause as Anamul danced down the track and smashed the bowler over long-on for two sixes.
Aaron was bowling well past the 140kph mark but his length was easily picked by up the promising 21-year-old.
The listless India pacer conceded 39 runs from his first spell of five overs.
To add to his woes, he was barred from bowling after the fifth ball of his eighth over following a second waist-high beamer that floored the Bangla skipper after hitting him on the left of his rib cage.
Aaron leaked 74 from 7.5 overs in two spells, which incidentally is the second highest conceded by a bowler against Bangladesh after the UAE's Khurram Khan (78).
The only bright spot in Aaron's bowling is that he denied the impressive Anamul a second international century making the batsman play on.
The innings then belonged to Mushfiqur, who showed resolute spirit despite being hit badly to complete the milestone century for Bangladesh.
Earlier, a lovely display of line and length bowling by Shami greeted the hosts, and the first one hour was a testing time for both the openers.
Persisting with an off-stump line, Shami found some outside edges that went in the vacant slip region as the Bangla duo looked tentative to start with.
Shami got the desired result when his short ball was mistimed by Shamsur to be taken by the bowler.
Image: Virat Kohli celebrates after scoring a hundred
Photograph: Andrew Biraj/Reuters
Two months into 2014, Team India still looking for first win
Sangakkara's ton gives SL unassailable 2-0 lead in Bangladesh ODIs
Milestone man Sangakkara matches Gooch's feat in Chittagong
India hold on for a draw at Basin Reserve; New Zealand win series
Wellington Test PHOTOS: New Zealand batsmen dominate on Day Four