Sri Lanka lost both the Test and one-day series in South Africa.
Dilshan, 35, took up the captaincy on a series-to-series basis after Kumar Sangakkara stepped down after Sri Lanka's defeat in the 2011 World Cup final against India.
"Dilshan has resigned as captain in all three formats of the game," Sri Lanka Cricket (SLC) said, without naming a successor.
Under Dilshan, Sri Lanka lost Test and one-day series against England, Australia, Pakistan and South Africa.
"Members of the executive committee take this opportunity to thank Dilshan for his commitment and dedication during his tenure as the national captain," the board said.
"We also wish him well as he continues to represent Sri Lanka as a national player."
While Dilshan's own batting form suffered during his reign, he led the team to a historic Test win in Durban this year, Sri Lanka's first on South African soil.
There was no immediate comment from Dilshan, who has so far scored 4,662 runs in Tests and 5,896 runs in one-day internationals.
Local media have speculated that former captain Mahela Jayawardene could be Dilshan's replacement.
COMMENTS
Comments are moderated and generally will be posted if they are on-topic and not abusive.
For more information, please see our Comments FAQ