The decision, announced after the Pakistan Super League (PSL) final here on Sunday night, put an end to an illustrious and colour 21-year career.
The 36-year-old however, will continue to play in the PSL for the next two years.
“I have said goodbye to international cricket,” Afridi was quoted as saying by Cricinfo.
“I am playing for my fans and will continue to play this league for another two years but it’s goodbye from international cricket,” he added.
“Now my foundation is important for me. I have played with seriousness and in a professional way for my country.”
Known for his slam bang style of batting, Afridi produced a typically whirlwind stint of 54 runs off just 28 balls that almost earned a victory for Peshawar Zalmi against Karachi Kings.
Afridi burst onto the international scene in October 1996 with a 37-ball century against Sri Lanka in only his second One-Day International (ODI) match.
The veteran all-rounder had retired from Test cricket and ODIs earlier. He had announced and revoked his retirement from Test cricket in 2006 before walking away from the longest format of the game for good in 2010.
He retired from ODIs after the 2015 World Cup.
Afridi’s international career includes 27 Test matches which yielded 1,176 runs with a highest score of 156 and 48 wickets. He also scored 8,064 runs in 398 ODIs with a highest score of 124 while taking 395 wickets with his leg-spin.
He has also featured in 98 Twenty20 International matches, scoring 1,405 runs and claiming 97 wickets.