Mathews met with chief selector Sanath Jayasuriya to discuss his future with the team before a one-off Test against Zimbabwe beginning Friday, said an official with Sri Lanka's cricket board.
"He has quit the captaincy from all three forms of the game," the official said on condition on anonymity, referring to Test, one-day international and twenty20 formats of cricket.
An official announcement of Mathews' resignation was expected later Wednesday, the official added.
Mathews took the brunt of the criticism levelled at Sri Lanka's cricketers in the aftermath of their 3-2 series loss at home to minnows Zimbabwe on Monday.
It compounded woes for the struggling side, which entered the series without a coach after Graham Ford's sudden exit following their poor showing in the Champions Trophy last month.
Sri Lanka's sports minister delivered the squad an ultimatum after that performance, ordering players get in shape or face the boot after declaring them unfit to compete on the world stage.