The firms said the merger would create an industry leader that would have more than 100 treatments in mid- to late-stage development.
Allergan shareholders will receive 11.3 shares of the combined company for each of their Allergan shares, and Pfizer investors will receive one share of the combined company for each of their Pfizer shares.
Last year rival AstraZeneca fought off a £69bn takeover bid from Pfizer, saying the bid undervalued the business.
The Pfizer-Allergan merger is also the largest so-called inversion deal in corporate history, a tax-saving manoeuvre in which a US company reorganises in another country with a lower corporate tax rate.
The US corporate tax rate of 35 per cent is one of the highest in the world, and compares with Ireland’s rate of 12.5 per cent. US efforts to curb the practice have so far proven ineffective.
Botox maker Allergan is based in Dublin, but runs much of its operations out of New Jersey in the US.
The combined business, which will be named Pfizer, will be legally domiciled in Ireland, but will have its global operational headquarters in New York.
Ian Read, the Scots-born chairman and chief executive of Viagra maker Pfizer, said: “The proposed combination of Pfizer and Allergan will create a leading global pharmaceutical company with the strength to research, discover and deliver more medicines and therapies to more people around the world.”
Allergan chief executive Brent Saunders said the deal brought together “two biopharma powerhouses”.
Saunders added: “This bold action is the next chapter in the successful transformation of Allergan, allowing us to operate with greater resources at a much bigger scale.”
Pfizer said the addition of Allergan’s treatments in areas such as eye care, neuroscience and dermatology will see the combined group sales “significantly enhanced”.
Allergan is best known for its Botox treatment, but also makes Alzheimer’s drug Namenda and dry-eye medication Restasis.
The deal is expected to complete in the second half of next year, subject to regulatory approval in the US and the European Union.
Pfizer shareholders will hold 56 per cent of the combined firm, with the rest owned by Allergan investors.
The deal values Allergan’s shares at $363.63 each, just over a 16 per cent premium compared with the stock’s closing price on Friday.