The star batter’s decision comes just days after his side lost their away series in South Africa 2-1, relinquishing a 1-0 lead.
Kohli, 33, had also previously stepped down as India’s limited overs captain last year as well as handing over the same role with his Indian Premier League side Royal Challengers Bangalore.
“It’s been seven years of hard work, toil and relentless perseverance everyday to take the team in the right direction,” Kohli said.
“I’ve done the job with absolute honesty and left nothing out there. Everything has to come to a halt at some stage, and for me as Test captain of India, it’s now.
Kohli led India in 68 Tests, winning 40 of them. In his time as Test skipper, he scored 5,864 runs at an average of 54.8. He reached 100 on 20 occasions with a best of 254.
The likes of Rohit Sharma, Kohli’s replacement as white ball skipper, KL Rahul and Ajinkye Rahane will no doubt be under consideration as his successor.
Kohli is in the squad for a trio of one-day internationals against South Africa from Wednesday to Sunday in Paarl and Cape Town.