Assuming it wins the backing of shareholders, the deal will be the largest overseas purchase by a Japanese company and propel Takeda, led by Frenchman Christophe Weber, into the top 10 rankings of global drugmakers.
The tie-up crowns a hectic few months of M&A activity as big drugmakers, including Novartis and Sanofi, have brought in promising medicines developed by younger firms.
The enlarged group will be a Japanese national champion in pharmaceuticals and a leader in gastroenterology, neuroscience, oncology, rare diseases and blood-derived therapies, used for serious conditions such as haemophilia.
Shire has profitable businesses selling drugs for hyperactivity and rare disorders but the size of the deal will make Takeda one of the most indebted drugmakers, prompting Standard & Poor's to warn of a potential credit downgrade.
To pay off debts quickly, Takeda plans to slash thousands of jobs and cut back on duplicated drug research.
The deal, struck on the last day Takeda had to make a firm bid, is around 46 percent cash and 54 percent stock, leaving Shire shareholders owning around half of the combination.
Shire had rejected four previous offers, due to price concerns and the fact that the Japanese company is proposing to pay for much of the acquisition in stock.
Shire investors will receive $30.33 (22.5 pounds) in cash and either 0.839 new Takeda shares or 1.678 Takeda American depositary shares for each share, valuing the offer at 48.17 pounds a share based on the latest price and exchange rate.
That is a 60 percent premium to the price before Takeda first declared its interest six weeks ago.
Shire's shares were trading 4 percent up on the previous close at just over 40 pounds by 1230 GMT, still well below the agreed price and indicating that some uncertainty remains.
"I think it is a good deal for Shire shareholders but not everybody may think that. However, the risk is that if shareholders vote this down then the shares are going to go down a lot," said Polar Capital fund manager Dan Mahony, who owns both Shire and Takeda stock.
The deal must get the support of 75 percent of Shire's voting shareholders. While some of them do not want to hold Takeda paper, Weber told reporters he believed most would accept.
"Their board and our board is confident that both shareholders will see the benefit of the acquisition," he said.
Jefferies analysts said they expected the shares to trade at a relatively wide discount to the offer, given the large stock component and the fact the deal is not expected to close until the first half of 2019.
The transaction also needs two-thirds approval from Takeda shareholders.
Weber became Takeda's first non-Japanese CEO in 2015 and has been hunting for acquisitions to make the company more global and reduce its exposure to a mature Japanese pharmaceutical market.
Prior to his arrival, Takeda bought Nycomed for $14 billion in 2011 in its previous biggest deal. Last year Weber bought U.S. cancer specialist Ariad Pharmaceuticals for $5 billion.
Buying Shire is a big financial stretch for Takeda but Weber believes it will generate substantial cash flow, enabling the enlarged group to pay down its borrowings quickly.
Takeda said $30.1 billion in bridge loan financing would be replaced with a combination of long-term debt, hybrid capital and available cash ahead of completion, without providing a breakdown.
The Japanese company predicts annual cost synergies of at least $1.4 billion three years after completion, including $600 million in research and development costs, and the deal is expected to boost underlying earnings significantly from the first full year after closing.
Jobs will go, with the group's combined 52,000 workforce likely to be reduced by 6-7 percent. The companies have a number of commercial, research and manufacturing overlaps, particularly in the United States.
Takeda said it would maintain its global headquarters in Japan and evaluate consolidating Shire's operations into Takeda's in the Boston area, Switzerland and Singapore.
Up to three Shire directors will join the board when the deal is completed and Takeda will retain the services of key staff, including Shire CEO Flemming Ornskov, who will get 200 percent of his 2018 annual salary and target bonus.
Weber argued Takeda would be able to maintain its investment grade credit rating with a target of achieving a net debt to EBITDA ratio of 2.0 times or less in the medium term.
"The commitment to get down to two times EBITDA in three to five years really shows how cash-generative Shire is," said Polar Capital's Mahony.
Some analysts have suggested Takeda could sell off certain Shire businesses to make the deal more manageable but Weber said gastroenterology, neuroscience, oncology, rare diseases and blood products were all important areas to be retained.
There may, however, be opportunities to divest certain medicines falling outside these fields.
"There is 25 percent (of the portfolio) which is more isolated products. Some are doing very well, some less well. That's where you could have some portfolio assessment and potentially some disposals," Weber said.
Shire said last month it would be willing to recommend an offer from Takeda after it rejected four previous approaches.
The company traces its roots back to 1986, when it began as a seller of calcium supplements to treat osteoporosis, operating from an office above a shop in Hampshire, southern England. Since then, it has grown rapidly through acquisitions to generate revenues of about $15.2 billion last year.
But it has been under pressure in the past 12 months due to greater competition from generic drugs and debt from its widely criticised $32 billion acquisition of Baxalta in 2016.
Takeda was advised by Evercore, J.P. Morgan and Nomura, while Shire worked with Citi, Goldman Sachs and Morgan Stanley.
(Editing by Keith Weir and Alexander Smith)
By Ben Hirschler, Paul Sandle and Sam Nussey