Following his good one-day performance against Sri Lanka, Dhoni replaced External link opens in new tab or windowDinesh Karthik in December 2005 as the Indian Test wicket-keeper. Dhoni scored 30 runs in his debut match that was marred by rain. Dhoni came to the crease when the team was struggling at 109/5 and as wickets kept falling around him, he played an aggressive innings and was the last man dismissed.Dhoni made his maiden half-century in the second Test and his quick scoring rate (half century came off 51 balls) aided India to set a target of 436 and the Sri Lankans were bowled out for 247.

India toured Pakistan in January–February 2006 and Dhoni scored his maiden century in the second Test at External link opens in new tab or windowFaisalabad. India was left in a tight spot as Dhoni was joined by External link opens in new tab or windowIrfan Pathan with the team still 107 away from avoiding a follow-on. Dhoni played his typical aggressive innings as he brought up his maiden Test hundred in just 93 balls after scoring the first fifty in just 34 deliveries.

Dhoni followed the century up with some prosaic batting performances over the next three matches, one against Pakistan that India lost and two against England that had India holding a 1–0 lead. Dhoni was the top scorer in India's first innings in the third Test at External link opens in new tab or windowWankhede Stadium as his 64 aided India post a respectable 279 in reply to England's 400. However Dhoni and the Indian fielders dropped catches and missed many dismissal chances including a key stumping opportunity of External link opens in new tab or windowAndrew Flintoff (14).Dhoni failed to collect the External link opens in new tab or windowHarbhajan Singh delivery cleanly as Flintoff went on to make 36 more runs as England set a target of 313 for the home team, a target that Indian were never in the reckoning. A batting collapse saw the team being dismissed for 100 and Dhoni scored just 5 runs and faced criticism for his wicket-keeping lapses as well as his shot selections.

External link opens in new tab or window
Dhoni behind the stumps

On the External link opens in new tab or windowWest Indies tour in 2006, Dhoni scored a quick and aggressive 69 in the first Test at External link opens in new tab or windowAntigua. The rest of the series was unremarkable for Dhoni as he scored 99 runs in the remaining 6 innings but his wicket-keeping skills improved and he finished the series with 13 catches and 4 External link opens in new tab or windowstumpings. In the Test series in South Africa later that year, Dhoni's scores of 34 and 47 were not sufficient to save the second Test against the Proteas as India lost the series 2–1, squandering the chance to build on their first ever Test victory in South Africa (achieved in the first Test match). Dhoni's bruised hands ruled him out of the third Test match.

On the fourth day of the first Test match at External link opens in new tab or windowAntigua Recreation Ground, External link opens in new tab or windowSt John's, External link opens in new tab or windowAntigua during External link opens in new tab or windowIndia's tour of West Indies, 2006, Dhoni's flick off External link opens in new tab or windowDave Mohammed to the midwicket region was caught by External link opens in new tab or windowDaren Ganga. As the batsman started to walk back, captain Dravid declared the innings when confusion started as the umpires were not certain if the fielder stepped on the ropes and Dhoni stayed for the umpire's verdict. While the replays were inconclusive, the captain of the West Indies side, External link opens in new tab or windowBrian Lara, wanted Dhoni to walk off based on the fielder's assertion of the catch. The impasse continued for more than 15 minutes and Lara's temper was on display with finger wagging against the umpires and snatching the ball from umpire External link opens in new tab or windowAsad Rauf. Ultimately, Dhoni walked off and Dravid's declaration was effected but the game was delayed, and Lara's action was criticised by the commentators and former players. Lara was summoned by the match referee to give an explanation of his actions but he was not fined.

Dhoni scored two centuries in Sri Lanka's tour of India in 2009, a series of three matches in which he led India to a 2–0 victory. With this feat, India soared up to the number one position in Test cricket for the first time in history. India scored 726–9 (decl) in the third match of this series, which was their highest Test total then.

He played his last series in the 2014–15 season in External link opens in new tab or windowIndia's tour of Australia captaining India in the second and third tests; losing the second and drawing the third, trailing the series 2–0 before the Sydney Test. Following the third Test in External link opens in new tab or windowMelbourne, Dhoni announced his retirement from the format.In his last Test, he effected 9 dismissals (8 catches and 1 stumping), and in the process, went past External link opens in new tab or windowKumar Sangakkara in the record for External link opens in new tab or windowstumpings with 134 (in all three formats combined)and also broke the record for effecting the most dismissals in a match by an External link opens in new tab or windowIndian wicketkeeper.He finished his last innings unbeaten making 24 runs.

Captain of India

External link opens in new tab or window
Dhoni captaining India in an ODI in February 2012.

Dhoni was named the captain of Indian squad for the inaugural External link opens in new tab or windowICC World Twenty20 held in South Africa in September 2007.India were crowned champions as Dhoni led the team to victory against External link opens in new tab or windowPakistan in a thrilling contest.He, then, went on to become the ODI captain of the Indian team for the seven-match ODI series against External link opens in new tab or windowAustralia in September 2007. He made his debut as full-time Test captain of India during the fourth and final Test against Australia at Nagpur in November 2008 replacing External link opens in new tab or windowAnil Kumble who was injured in the third test and who then announced his retirement. Dhoni was vice-captain in this series up to that point.India eventually won that Test thus clinching the series 2–0 and retained the External link opens in new tab or windowBorder-Gavaskar Trophy. Dhoni had previously captained India on a stand-in basis against External link opens in new tab or windowSouth Africa and Australia in 2008 and 2009 respectively.

It was under his captaincy that India climbed to No. 1 in the ICC Test Rankings in December 2009. After that he managed to lead India in a series-leveling world championship of Tests against the South Africans in February 2010. India also managed to draw the Test series 1–1 in South Africa later that year.

After winning the External link opens in new tab or window2011 ICC Cricket World Cup final against Sri Lanka on 2 April 2011 with his match winning knock of unbeaten 91, Tendulkar heaped praises on Dhoni, claiming him to be the best captain he has played under. Tendulkar mentioned that it was Dhoni's calm influence that was rubbing off on all his team-mates and described Dhoni's handling of pressure was incredible.

Only eleven players have captained ten or more Tests playing as a wicket-keeper. Dhoni leads the table with 60 Tests as captain, 35 ahead of External link opens in new tab or windowMushfiqur Rahim in second place

In March 2013, Dhoni became the most successful Indian Test captain when he eclipsed External link opens in new tab or windowSourav Ganguly's record of 21 victories from 49 Tests.Ganguly also said in an interview to a news channel that Dhoni is the all-time greatest captain of India and he has a great record to support this credential.

In August 2016, Dhoni was selected as captain for India's first tour to the United States, where India played two T20Is against the West Indies in External link opens in new tab or windowLauderhill, Florida.External link opens in new tab or window[102] India lost the first match on 27 August 2016, during which Dhoni surpassed former Australian captain External link opens in new tab or windowRicky Ponting to become the most experienced captain in international cricket.

Dhoni's final game as the Indian limited-overs captain was on 10 January 2017 in a warm-up game between England and India during the limited-overs leg of External link opens in new tab or windowEngland's tour of India. Dhoni stated he will still fulfill his duties as captain in various domestic teams.