Aon PLC and Willis Towers Watson PLC abandoned a more than $30 billion tie-up to create the world’s largest insurance broker, deciding it wasn’t worth pursuing in the face of Justice Department opposition to the merger.

The DOJ filed a lawsuit against the deal last month, the first big test of the Biden administration’s more muscular antitrust policy. The suit, filed in a federal court in Washington, said that the proposed merger would lead to higher prices and reduced innovation for U.S. businesses, employers and unions that rely on their services.

In a statement, U.S. Attorney General Merrick Garland called the decision “a victory for competition and for American businesses, and ultimately, for their customers, employees and retirees across the country.”

The brokers, which announced their deal in March 2020, help companies buy insurance and advise them on risk management. They work on behalf of their corporate clients, earning fees by negotiating insurance packages across a range of property-casualty insurers. Aon and Willis Towers also are major consultants to businesses on health and other benefit packages for their employees.

The Justice Department lawsuit followed an investigation of more than a year. Aon and Willis Towers had agreed to sell an assortment of different assets to smaller rivals to appease Europe’s antitrust regulator and the Justice Department by creating new and larger competitors. While the European Commission signed off on those moves, the DOJ argued they didn’t go far enough.

“We reached an impasse with the U.S. Department of Justice,“ Aon Chief Executive Greg Case said Monday. “The DOJ position is remarkably out of step with the rest of the global regulatory community, and we’re confident that we’d win in court,” according to a transcript of a video message of Mr. Case to company employees.

The prospect of a lengthy court hearing was another reason for the merger’s demise. Aon and Willis Tower had requested a court hearing for Aug. 23, but a federal judge earlier this month ruled the trial wouldn’t start until Nov. 18.

“The inability to secure an expedited resolution of the litigation brought us to this point,” Mr. Case said. “Unfortunately, while we requested a speedy trial, the current course with DOJ would likely have taken us well into 2022,” according to the transcript.

The companies’ decision to terminate the deal reinforces market expectations that Washington is poised to take an aggressive stance against mergers in industries that already have few competitors.

However, the overall record pace of deals shows no signs of slowing down, as economies rebound from the pandemic, equity markets power higher and interest rates remain low.

Aon and Willis Towers, which are both based in Ireland, are the No. 2 and No 3 biggest brokers measured by revenue behind industry leader New York-based Marsh & McLennan Cos. Together they would have total annual revenue of more $20 billion, leapfrogging Marsh’s $17.2 billion.

The Justice Department said that the scale of the combined entity would eliminate competition in different U.S. product markets, including brokerage services for property, casualty and liability insurance, as well as health benefits for large corporate customers.

The companies said that the Justice Department’s opposition to the deal reflected a lack of understanding of their business, their clients and the marketplaces in which they operate. They said the deal would be good for the industry by creating scale, and thus wringing out costs and reducing overlap. They said the scale would help the companies create new insurance-industry products, particularly for emerging markets, and give them resources to help protect against cybercrime and climate change.

Both Aon and Willis are listed in New York. Aon’s stock traded more than 9% higher Monday, while Willis Towers’ stock fell 8%.

The deal’s termination comes more than a year after its inauspicious beginning. Aon and Willis Towers first announced their planned merger in March 2020—at the time the biggest deal of the year. But that announcement coincided with a market selloff amid the fallout from the spread of the coronavirus and an oil price war between Russia and Saudi Arabia that temporarily wiped out about $5 billion of value from the proposed deal.

Aon and Willis Tower had been betting on the merger to generate annual cost savings of $800 million and boost revenue through the sale of the new products, in areas such as intellectual property. The challenge for each company is reaching those goals without the benefits of the added heft.

Aon is required to pay Willis Towers a $1 billion termination fee, which it could use to go shopping to strengthen some of its coverage areas, and buy back shares. In the wake of the announcement, Willis Towers announced that its board had approved an increase of $1 billion to its existing share-repurchase program.

Other than providing economies of scale, the deal would have paved the way for Willis Towers CEO John Haley to retire. He had previously planned to give up that role at the end of 2020. He would have become executive chairman under the tie-up. Aon’s Mr. Case was to assume the CEO role of the combined entity.

Also declining Monday morning were shares of rival A.J. Gallagher & Co., down 1.7%. Gallagher had been betting on the Aon-Willis Towers deal as a way to expand its operations. Aon and Willis Towers, in a bid to help win required antitrust approvals, had conditionally agreed in May to sell a $3.57 billion package of assets to their Illinois-based rival that analysts said would have made it a major reinsurance broker to more effectively challenge Aon-Willis and Marsh in that business.

At the biggest brokers, the business is more than just arranging insurance programs. Increasingly it has been about analyzing data as a way to help clients understand the risks they face and how best to protect against those, including in areas such as cybercrime and climate change. Aon’s tie-up with Willis would have expanded the amount of data that Aon’s computer scientists work with.

That said, Aon and Willis already have economies of scale, and weren’t under any financial pressures that were motivating a deal, analysts said.

The proposed Aon-Willis deal was part of a broader trend as the industry consolidates to reach new markets and expand product offerings. Marsh bought the U.K.’s Jardine Lloyd Thompson Group PLC in a £4.3 billion ($5.63 billion) pact in 2018, which closed in 2019.

Industry analysts and executives noted that private-equity firms have ample money to invest in the industry, as the dust settles over the scrapped deal.

Private-equity firms have long liked the brokerage industry because of the steady fees earned by the middlemen. Also, the brokerages aren’t required by regulators to hold big capital cushions, as are insurance companies themselves, so less private-equity money gets tied up in brokerage deals than in those involving insurance carriers.

In an earnings call last week, Marsh & McLennan Chief Executive Daniel Glaser said the New York firm is itself continuing to look at possible acquisitions.

“Obviously, there’s a lot of capital in the world,” he said, so deal prices are higher than the company would like. But Marsh’s strategy is searching to fill out “a string of pearls, not something where it’s one mega type of acquisition.”

Write to Ben Dummett at ben.dummett@wsj.com, Leslie Scism at leslie.scism@wsj.com and Dave Sebastian at dave.sebastian@wsj.com