The 26-year-old left-arm paceman played the first two of the three one-day matches before suffering a hamstring injury which was initially thought to be minor.
Pakistan Cricket Board (PCB) said he was out of the two-Test series, which starts in Khulna from Wednesday.
"Rahat is out of the Test series due to hamstring injury. Replacement, if any, will be announced in due course," the PCB said in a statement.
Batsman Sohaib Maqsood (arm fracture) and paceman Sohail Khan were ruled out ahead of the tour while leg-spinner Yasir Shah (thumb) and paceman Ehsan Adil (hamstring) were injured on the trip.
Shah, however, recovered and will be available for the Tests.
Another Pakistan paceman, Mohammad Irfan, is recovering from a hip injury sustained during the World Cup held in Australia and New Zealand in February-March.
On the field, a new-look Pakistan team suffered their worst-ever 3-0 whitewash in the one-day series -- their first against Bangladesh.
They also lost the only Twenty20 on Sunday.
PCB chairman Shaharyar Khan has said he will review the poor performance of the team as well as the frequent injuries to players.
The second and final Test will start in Dhaka from May 2.
Pakistan have won all of the eight Tests played against Bangladesh.
COMMENTS (5)
Comments are moderated and generally will be posted if they are on-topic and not abusive.
For more information, please see our Comments FAQ