The two companies had extended the deadline for talks on the acquisition to May 8.
Takeda obtained a United States dollars 31 billion bridge loan to help finance the deal, a fact that had unnerved some investors before the deal's announcement.
Shares in Takeda closed up 3.99 percent at 4,638 yen just before the announcement, which had been widely expected, while in London trade Shire was up 4.77 percent at £40.40.
Christophe Weber, Takeda's president and CEO, said, "Shire's highly complementary product portfolio and pipeline, as well as experienced employees, will accelerate our transformation for a stronger Takeda".
With few late-stage experimental drugs in its own pipeline, Takeda needs lucrative new therapies.
Takeda's best-selling drugs treat metabolic diseases, cancer, and cardiovascular problems.
Shire, founded in Basingstoke, Hampshire, in 1986, makes ADHD drugs Adderall and Vyvanse and the dry-eye drops Xiidra, as well as treatments for rare diseases. According to the agreed deal, the Irish drugmaker investors will receive $30.33 in cash and either 0.839 new Takeda shares or 1.678 Takeda American depositary receipts for each share.
Representatives for Takeda and Shire declined to comment.
The boards of both firms have finally agreed on the terms of the deal, settling on an offer of £49.01 per Shire share.
However, Shire stock prices have rocketed more than 30 percent since late March.
Shire's shares climbed more than three per cent in early trading. A buyout like this would require a big boost in debt, which Moody's doesn't like. The company is based in Dublin for tax purposes but run from Boston and has shifted most of its operations from the United Kingdom to the US.
Takeda expects the merged firms will achieve cost-savings of at least US$1.4bn/y.
Takeda will become the only pharma company with dual listings in Tokyo and NY.
The deal is by far the largest acquisition of a foreign firm by a Japanese company, dwarfing SoftBank Group's 2016 acquisition of Britain's ARM Holdings in a $24.3 billion deal. Last year Weber bought US cancer specialist Ariad Pharmaceuticals for $5 billion. Last month it announced the sale of its oncology business to French drug maker Servier for $2.4 billion.