Afridi was on Thursday charged by the International Cricket Council (ICC) with "conduct unbecoming... which could bring (players or officials) or the game of cricket into disrepute".
The charge was laid by ICC chief executive Malcolm Speed and relates to an incident which took place in the first one-day international against South Africa at Centurion on Sunday.
As Afridi walked the stairs after being dismissed he reacted angrily to something said by a fan by jabbing his bat in the direction of the supporter.
If found guilty, Afridi faces a ban of between two and four Test matches or between four and eight one-dayers.
Pakistan have three more one-day internationals left in South Africa before their World Cup campaign starts on March 13 against West Indies in Jamaica.
"The hearing, to be conducted by Chris Broad, a member of the elite panel of ICC match referees, will take place as soon as possible and details of its timing will be released in due course, as will the result," said an ICC statement.
"Until the hearing takes place, Afridi remains available to play for Pakistan.
"If a player is found guilty of a Level 2, 3 or 4 offence then he has a right of appeal. Such an appeal must be lodged in writing with the ICC's legal counsel within 24 hours of the player receiving the original verdict.
"Mr Speed laid the charge after studying video footage of the incident while in the Caribbean, where he is attending a series of meetings ahead of next month's ICC Cricket World Cup.
"Under the Code, he is one of four individuals or groups entitled to lay a charge, the others being the umpires, either side's team manager and either side's Chief Executive Officer."
Sunday's incident happened when Afridi had been dismissed for just 17 off Makhaya Ntini.
The 26-year-old Afridi is no stranger to controversy.
In 2005, he was banned for one Test and two one-day internationals for damaging the pitch during a Test against England.
He has played 236 one-day internationals scoring 4,974 runs and taking 198 wickets.