During a successful but controversial career, Ajmal was once celebrated as the world's number one bowler in one day internationals (ODIs) and Twenty20 cricket, and was almost as successful in Tests.
He famously captured 24 wickets in three Tests against England in 2012.
But his time in the limelight was cut short after a temporary ban for chucking saw him return to the sport in 2015 without the same form.
"I am quitting all forms of cricket after the current National Twenty20 tournament," Ajmal told AFP from Rawalpindi on the phone.
Also Read
"It was a highly satisfying career in which I achieved whatever goals I set for myself and helped the team win matches."
Ajmal took 178 wickets in 35 Tests, the last of which was at Galle in Sri Lanka in 2014, where his bowling action was reported for a second time. It was first reported during an ODI series against Australia in the UAE in 2009.
But in spite of his early successes, Ajmal said the last two years of his career had been frustrating.
"Ban over action left me frustrated and hurt," he said. "More hurtful was that current player Stuart Broad questioned that and his comments hurt me no end. But I have forgiven everyone."
England fast bowler Broad questioned the legality of Ajmal's action when the Pakistani spinner was featuring in an English county championship a month before the umpires' report in Sri Lanka.
Ajmal took a swipe at the process of calling bowlers out for illegal action.
Hafeez's action was reported for a second time last month.
Ajmal said he will concentrate on coaching in the future.
Disclaimer: No Business Standard Journalist was involved in creation of this content