The 30-year-old was named in the 15-man squad subject to complete recovery from the injury, sustained during the second Test against Sri Lanka earlier this month.
But after bowling during a fitness test on Friday, it was found that the left-arm paceman had not fully recovered.
Riaz will be replaced by another left-arm fast bowler, Zia-ul-Haq, who was in the squad as a stand-by.
“Riaz bowled in nets on Friday and still feels stiffness in his bowling hand. Thus he withdrew himself from T20s squad. Zia will replace him,” a Pakistan Cricket Board statement said.
Twenty-year-old Zia was impressive during a Pakistan ‘A’ team tour of Sri Lanka last month.
Riaz said he was disappointed.
“Unfortunately still some stiffness in my bowling hand Hopefully another week or so to give my 100 percent,” Riaz said on his Twitter account.
Pakistan, already leading the five-match ODI series by 3-1, will face Sri Lanka in the fifth and final one-day in Hambantota on Sunday. That will be followed by two Twenty20 internationals on July 30 and August 1 — both in Colombo.
Squad: Shahid Afridi (captain), Ahmed Shehzad, Nauman Anwar, Mohammad Hafeez, Mukhtar Ahmed, Umar Akmal, Shoaib Malik, Mohammad Rizwan, Sarfraz Ahmed, Yasir Shah, Sohail Tanvir, Imad Wasim, Anwar Ali, Mohammad Irfan, Zia-ul-Haq. -AFP