Kohli took over as the full-time Test captain when Dhoni retired from the format midway through India's tour of Australia in 2014-15, and later became captain across formats when Dhoni quit his limited-overs post in early 2017.
Kohli said the process was a gradual one of "earning trust" over several years.
"I was always inclined towards taking responsibility," Kohli said of his early days in the India dressing room, while speaking to his team-mate R Ashwin on his Instagram Live show Reminisce With Ash. "After that it was all about just wanting to play, wanting to be in the XI regularly. I didn't play all the games, but I wanted to be discussed, that 'whether this guy is good enough to play or not.' That is a transition that slowly happens.
"Then with your interest in the game you start talking to the captain regularly. I was always in MS's ear, standing next to him, saying, 'We can do this, we can do that.' He would deny a lot of things but he would discuss a lot of things as well. I think he got a lot of confidence that I can do this after him.
"A large portion of me becoming captain was also to do with him observing me for a long period of time. It can't just happen that he goes and the selectors say, 'Okay you become captain.' Obviously the guy who is there takes responsibility and says, 'Okay I think this is the next guy. I will tell you how it is going.' And then slowly that transition is formed. He played a big role in that, and that trust you have to build over six-seven years. It doesn't happen overnight, it's a process."
Kohli was first appointed vice-captain for the 2012 Asia Cup, which followed India's tour of Australia for a Test series and a tri-series in 2011-12. In a tour that otherwise went poorly for India, who were blanked 4-0 in the Tests and failed to reach the tri-series final, Kohli emerged with distinction. He scored his maiden Test century in the fourth match in Adelaide, becoming the only India batsman to reach three figures in that series. In the ODIs, he made his then highest score in the format , smashing 133* off just 86 balls as India chased down a target of 321 in 36.4 overs to keep their hopes of making the final alive.
Kohli said that tour helped him become aware of his game and hone it significantly. "I remember that whole season," he said. "It was from that Test hundred in Adelaide to continuously stringing scores. That was a phase of six to eight months where I really realised a lot about my own game and came into my own as far as my skills were concerned.
"I was very competitive but I wasn't very sure or in control of what I wanted to do before. When you come in new, you're still figuring out how to go about it. At the international stage you want to be feared, you want to be respected. You don't want to walk in and hear, 'He's one of the youngsters, we'll just knock him over.' We all play for that. That was a phase where I started to realise this."
In the Asia Cup that followed, Kohli made 183 in another tall chase, against Pakistan. He revealed that during this knock, he had negated the threat posed by Saeed Ajmal by treating the offspinner as if he were a legspinner.
"I told myself I'm going to start playing him like a legspinner," Kohli said. "Because his doosra was quite difficult to face and his offspinner was not that lethal. So I said I'm going to try and hit him over cover consistently, and it just paid off. As soon as I negated his doosra, the potency of his threat became lesser and lesser.
"In that game I scored most of my runs against him through the off side [29 runs on the off side and 7 on the leg side]. My only aim was I'm going to make him unsettled with his doosra. He should fear bowling the doosra to me, then I'm on top of my game."