In a 2010 Test against India he hit the fastest century by a Bangladeshi, though his side lost. At the first BPL in 2012 he was Icon Player for Duronto Rajshahi, scoring 234 runs in 11 matches and leading them to a semifinal defeat by Barisal Burners. As captain at the 2012 Asia Cup, he guided Bangladesh to their first final, which they lost to Pakistan. On 11 March 2013 in Galle he became the first Bangladeshi to make a Test double hundred, passing Mohammad Ashraful's 190.
He quit the captaincy on May 8, 2013, soon called that a mistake, and on July 3 the BCB kept him in charge until year end. Later in 2013 Bangladesh drew two Tests and swept three ODIs against New Zealand at home. He made an ODI hundred against India at the 2014 Asia Cup despite injury, and scored his third Test century in the West Indies that August. From September 2014 Mashrafe Mortaza led the ODI side while Rahim kept the Test job. He was Man of the Series in the following home ODIs with 213 runs in five games, then made 298 runs in six matches at the World Cup in Australia, where a 141-run stand with Mahmudullah against England helped secure a first quarterfinal.
Afterwards he struck 220 runs in three ODIs as Pakistan were beaten 3-0, and featured in home ODI wins over India and South Africa. At the 2016 World T20 he fell with 2 needed from 3 balls against India, who won by one run. He led Bangladesh to their first Test win over England, levelling that series 1-1, and shared a 359-run fifth-wicket stand with Shakib while making 159 in a total of 595. He added a fifth Test hundred in Hyderabad and, in the 100th Test win in Sri Lanka, became the first Bangladeshi and 41st keeper to reach 100 Test dismissals.
A 45 in an Irish tri-series final won him Man of the Match, and he made two fifties at the 2017 Champions Trophy as Bangladesh reached the semifinals. On the tour of South Africa that followed, Bangladesh lost every match, though he made an ODI hundred and a fifty; he lost the captaincy afterwards.