The 36-year-old all-rounder, nicknamed “Boom Boom” for his fierce hitting, had suffered a drop in form over the past two years and was unable to steer Pakistan through the group stages of the competition in India.
“Today I wish to inform my fans in Pakistan and all over the world that I am relinquishing the captaincy of the T20 Pakistani team of my own volition,” he said in a statement.
Dileep Premachandran: Pakistan cricket legend Shahid Afridi's legacy well regarded in India
Afridi was appointed T20 captain for the second time in 2014, with his contract set to expire following the World T20 in India in 2016.
He led the team to the semi-finals of the same tournament in a previous stint as captain in 2010, but was removed a year later.
In 43 matches as captain, he led his team to 19 wins, 23 losses and one tie.
“For me it was a great honour to lead my country,” he said. “I intend to continue to play the game for my country and league etc, and request my fans for kindly keep praying and supporting me for my best future performances for Pakistan.”
Last week he took to Facebook and Twitter to issue a one-minute apology to the cricket-mad country.
Pointing to the star on his Pakistan jersey, he said: “For this star, and these colours, when I come to a ground, I carry the weight of my people’s hopes with me.
“Today, I, Shahid Afridi, apologise to the whole nation for not being able to fulfil the hopes of myself and my team.”
The 2009 champions had been widely criticised by fans for a lacklustre performance at the World T20 with just one victory, against unfancied Bangladesh, and big losses to India, New Zealand and Australia.
Afridi has been a fan favourite since he burst onto the scene in 1996, striking a 37-ball century against Sri Lanka in only his second match to set a world record that was unbeaten for 17 years.
He became known as a bowling all-rounder in the second half of his career and was instrumental in Pakistan’s early successes in Twenty20, including their 2009 victory.
Follow us on Twitter @NatSportUAE
Like us on Facebook at facebook.com/TheNationalSport