Sangakkara said he told the national selectors that he would quit as one-day and Twenty20 captain with immediate effect, but offered to continue as Test captain on an interim basis if required.
"After careful consideration I have concluded that it is in the best long-term interests of the team that I step down now as national captain so that a new leader can be properly groomed for the 2015 World Cup," Sangakkara, 33, wrote to Sri Lanka Cricket.
"This was a decision I made prior to the World Cup. I will be 37 by the next World Cup and I cannot therefore be sure of my place in the team.
"It is better that Sri Lanka is led now by a player who will be at the peak of their career during that tournament."
Sangakkara, a fluent left-hand batsman and wicket-keeper, said he had no plans yet to retire as a player.
"I met with the selectors on Monday and I explained my reasons for my decision and I assured them of my fullest support in helping our new captain settle into the leader