The decision comes two days after the US Treasury announced fresh plans to prevent deals known as "inversions", where a US firm merges with a company in a country with a lower tax rate.
The Pfizer-Allergan deal, valued at $160bn (Â£113bn), would have been the biggest example of an "inversion".
It would also have been the biggest pharmaceutical deal in history.
Pfizer said the move was "driven by the actions announced" by the US Treasury.
Ian Read, Pfizer's chairman and chief executive, said: "Pfizer approached this transaction from a position of strength and viewed the potential combination as an accelerator of existing strategies."
He added that the company could look at splitting off part of the business.
"We plan to make a decision about whether to pursue a potential separation of our innovative and established businesses by no later than the end of 2016, consistent with our original timeframe for the decision prior to the announcement of the potential Allergan transaction."
Pfizer said it would pay Botox-maker Allergan $150m "for reimbursement of expenses associated with the transaction".
Under the proposed acquisition, Pfizer would have moved its headquarters to Dublin, where the tax bill would have been lower than in the US.
The corporation tax rate in the Republic of Ireland is 12.5%, compared with 35% in the US.
On Tuesday, US President Barack Obama weighed in on the inversion trend, saying "these companies get all the rewards of being an American company without fulfilling their responsibility to pay their fair share of taxes".
In 2014, American fast-food chain Burger King bought Canadian coffee and doughnut chain, Tim Hortons. The merged group moved to Ontario in Canada, where the corporate tax rate is at 26.5%.
Analysts had said that Pfizer needed to look at acquisitions to help grow its business and revenue.
Pfizer made an offer to buy UK drugs group AstraZeneca in 2014. But Astra rejected the offer, arguing it undervalued the company.
US drugs giant Pfizer has scrapped a planned merger with Ireland's Allergan amid plans to change US tax laws.