Australia and New Zealand will co-host the World Cup from February 14 to March 29.
The swashbuckling batsman hit the fastest one-day hundred off just 36 balls in only his second match, against Sri Lanka in Nairobi in 1996, a record which New Zealand's Corey Anderson broke earlier this year. Anderson made a 35-ball hundred against the West Indies.
Afridi holds the record for most sixes in one-day internationals with 342, and is the only player to have hit more than 400 sixes across all three formats of the game.
He has hit 49 sixes in Twenty20 cricket and 52 before his retirement from Tests in 2010.
As a leg-break bowler he has 391 wickets in 389 one-day internationals. His tally of wickets in Twenty20 cricket stands at 81.
"My journey has seen many ups and downs but now I am feeling satisfied that I am leaving on my own terms," Afridi said.
"People don't know, but international cricket is tense all the time," said Afridi, whose ambition is to complete 8,000 runs and 400 wickets. He currently has 7,870 runs in one-day cricket.
"I want to win the World Twenty20 in India in 2016 before quitting international cricket," said Afridi.
Afridi led Pakistan to the World Cup semi-final in 2011 before being removed after he fell out with then-Pakistan Cricket Board chairman Ijaz Butt and coach Waqar Younis.
- AFP