The 36-year-old, who played 81 Tests and 53 ODIs, announced his retirement following a meeting with the national selectors.
"I was shocked with my omission from the squad against Bangladesh," he told reporters.
Samaraweera was excluded from the 16-man squad after being originally included in the 20-member probable.
"The selectors told me that their idea was to play only two senior players in the series against Bangladesh and the next series against Zimbabwe," he said.
"They told me that my experience would be needed for the Pakistan tour which is nine months away. I decided to retire because there is no point in waiting for nine months. This will clash with plans in my personal life.
More From This Section
Chief selector Sanath Jayasuriya said they met the right-handed batsman to discuss his future plans after Samaraweera had yesterday informed Sri Lanka Cricket about his retirement.
Samaraweera has already signed up with the English county team Worcestershire for this summer.
Since the tour to Australia in December, Sri Lanka has seen a thorough shake-up of the set-up.
Angelo Mathews and Dinesh Chandimal were appointed new Test and T20 captains after Mahela Jayawardene announced his decision to give up captaincy.