Sammy, 30, had been in charge of the Test team since October 2010.
The West Indies Cricket Board (WICB) said that he will remain in charge of the Twenty20 international squad.
Sammy played in 38 Tests, captaining in 30 of those appearances.
"Darren Sammy has formally notified the West Indies Cricket Board of his decision to retire from Test cricket," said a WICB statement yesterday.
"Sammy has also informed the Board of his decision to continue to make himself available for selection for the other formats of the game."
"We thank Darren for his energetic and resolute leadership over the past four years and we continue to see his role as the Twenty20 captain as a critical one," said West Indies Cricket Board (WICB) president Dave Cameron.
Ramdin said he was honoured to be named the new Test skipper.
"It is an honour to be named as captain of the West Indies Test team. This is a huge opportunity and as a unit we are capable of representing the people of the West Indies," Ramdin said.
"My first assignment will be against New Zealand at home and this promises to be a very exciting series."
Ramdin's first challenge in his new role will be the West Indies versus New Zealand Test in Jamaica starting on June 8. The second Test at the Queen's Park Oval will be his first as Test captain on home Trinidad soil.
