Tuesday's announcement by Dhoni is the top story in most newspapers and many Indians have taken to social media to express their surprise.
The cricketer said he was retiring from Tests "to concentrate" on the 50 over and Twenty20 formats.
The Board of Control for Cricket in India (BCCI) called him "one of India's greatest Test captains".
The 33-year-old, who made his debut in 2005 and was captain for 60 of his 90 Tests, quit after India drew the third Test against Australia on Tuesday.
In its lead story Dhoni drops a bomb, The Hindustan Times wonders about the "abrupt announcement" and says that experts were surprised as the BCCI announcement came in the middle of Australia tour.
The Times of India reports that Dhoni got emotional after breaking news to his team: "MS Dhoni, always known as 'Captain Cool,' got a touch emotional when he announced his decision in the dressing room. His teammates hugged him and took pictures with the departing skipper."
Discussing his legacy, an editorial in the paper questions "what will we remember for MS Dhoni"?
"Even if India has had players come from its hinterland before, few managed to make such an impact as MS Dhoni. He infused a belief in small-town folks that they could rise to the very top if they backed their talent. And that would remain the biggest of his contributions to India's Test cricket team over the past decade," the paper writes.
In a story headlined Dhoni retires Dhoni style, the Indian Express reports that "a teary-eyed Dhoni gathered his teammates for an impromptu huddle in the dressing room and dropped the bombshell, leaving them astonished and devastated. Then around 45 minutes later, the rest of the world experienced the same shock".
Social media too has been abuzz with the news of Dhoni's retirement with his fellow cricketers and fans taking to Twitter to express their love and gratitude for Dhoni.
Cricketing legend Sachin Tendulkar applauded Dhoni's "wonderful career in test cricket":
Bollywood superstar Amitabh Bachchan praised him for his "courage":
Chandra Sekhar described him as "a true idol for Indian cricket":
Yash Khandelwal wrote he was "saddened" by Dhoni's retirement:
Columnist Devinder Sharma, however, said Dhoni's decision was right as it came when the cricketer is at his peak:
Indian captain Mahendra Singh Dhoni's decision to quit Test cricket has stunned many in his country.