The crude bomb exploded during a transport blockade on Saturday evening in the port city with the decision to leave taken on the advice of security manager Paul Slowe, the West Indies Cricket Board (WICB) said in a statement.
"The report emphasised that the current security environment in Bangladesh is not conducive to the playing of cricket in light of the 72 hours nationwide blockade and calls for countrywide dawn to dusk protest," the WICB said.
"Travel arrangements are being made to allow for the team's return to the Caribbean as quickly as possible.
"The team will remain safely accommodated at the team hotel under adequate security protection until departure from Bangladesh."
Bangladesh has been rocked by violent protests and a series of shutdowns and transport blockades led by the main opposition party, which is demanding the prime minister step down and elections be held under a non-party administration.
More than 60 people have been killed in the country since last month.
There was no immediate comment from the Bangladesh Cricket Board.
Bangladesh are scheduled to host Sri Lanka for a full series from January, followed by the Asia Cup and the Twenty20 World Cup in March-April..