MUMBAI—India is having its busiest year ever for corporate deal making, as foreign buyers are now spending more here than in China.

Companies and investors alike are betting the world’s fastest-growing large economy—once seen as bureaucratically sclerotic and unpredictable—is turning into a destination that offers opportunity driven by hundreds of millions of consumers. Other deal drivers include industry consolidation, a better bankruptcy system and a growing willingness among owners of large family businesses to cash out.

In all, mergers and acquisitions targeting Indian companies totaled $93.7 billion this year—up 52% from a year earlier—which is the highest tally since the economy started opening up in the 1990s, according to Dealogic. The value of overseas purchases in India has overtaken those in China. Acquirers spent $39.5 billion in India versus $32.8 billion in China, where growth is slowing and a trade battle with the U.S. is underway.

Prime Minister Narendra Modi is striving to make life easier for business. He has eased foreign direct investment rules, implemented a new bankruptcy code, replaced a complex web of taxes with a nationwide goods and services levy and promised policies to end “tax terrorism,” which in the past left some international firms with surprise retrospective bills. The country leapt 23 places in the World Bank’s ease-of-doing-business ranking this year.

“Overall the environment is far more conducive to deal activity,” said Pramod Kumar, managing director and head of banking at Barclays in India.