"I will not play Test cricket and will reconsider my future as a Test cricketer after next year's World Cup," Afridi, 26, told AFP on Thursday.
The surprise decision means Afridi will be unavailable for a Test series in England in July and August and also for Pakistan's home series against the West Indies in November and their tour of South Africa early next year.
There was immediate speculation that Afridi's temporary retirement from the Test arena maybe a kneejerk reaction to being dropped from the last Test against Sri Lanka in Kandy, a Test Pakistan ultimately won.
But Afridi said the strains of an excessive cricketing schedule was the main reason behind his decision.
"There is too much cricket and you don't get time to spend with your family. Now in the next year I will spend time with my family and focus on one-day cricket," he said.
"I took advice from captain Inzamam ul-Haq before reaching this decision and there was no pressure on me to take this decision.
"I know a lot of people will say that this is a decision taken in haste but I have been thinking of it for the last two, three months and after a lot of thinking I have come to it."
Afridi, an aggressive batsman and a handy leg-spinner, has done well in both forms of the game, scoring 1,634 runs with five centuries in 24 Tests besides taking 44 wickets.
He hit a career best 156 and another century in the Test series against India in January this year.
He holds the world record for the fastest one-day hundred, notched off just 37 balls against Sri Lanka in Nairobi in 1996. In a total of 222 limited overs internationals, he has scored 4,824 runs and taken 184 wickets.
"Afridi will be missed in Tests and is a valuable player," Inzamam said.
Pakistan coach Bob Woolmer said Afridi's decision was a shock.
"I am surprised," said the former South Africa coach, who had been credited with handling Afridi better than his predecessors since he took over the Pakistan role in June 2004.
"In the end it's Afridi's decision and makes an opportunity for others to play for Pakistan," he said.