Why Dhoni left the Captaincy before completing 200 ODIs as Captain?

We all were shattered when we heard this news and with sudden increase in popularity of Virat Kohli, this was surely on the cards. But nobody expected that our Captain Cool would step down so easily and that too from both ODI and T20s which he love the most of all the cricket forms. But what lead to this? Who is behind all this? Was it his own decision?