Companies can choose where they want to file for bankruptcy. And Mr. LoPucki said bankruptcy judges were reluctant to push back on fees, fearing lawyers would choose to file big cases elsewhere.

Toys “R” Us, based in Wayne, N.J., filed its Chapter 11 case in federal court in Richmond, Va., which has a reputation for approving large professional fees.

Toys “R” Us bankruptcy lawyers from Kirkland & Ellis said in a court filing last year that they were charging as much as $1,745 an hour in the case. That was 25 percent more than the average highest rate in 10 of the largest bankruptcies in 2017, according to an analysis by The New York Times.

Bankruptcy professionals say that working to reorganize or liquidate a company is time-consuming, complicated and intense. Toys “R” Us is made up of multiple corporate entities — in the United States and internationally — that have hired lawyers and advisers.

All of that has added up to a big bill. So far, the company said, it has shelled out $108 million on professional fees. It expects to spend as much as $348 million as a result of the bankruptcy, according to the company documents.

Toys “R” Us collapsed quickly, going from a potential turnaround play to a costly liquidation.

With cash tight, the company wanted last spring to take some of the pressure off by refinancing about $200 million of its total $5 billion in debt. But when word got out that Toys “R” Us had hired restructuring advisers, the company’s vendors were spooked heading into the crucial Christmas season.

By September, Toys “R” Us said it had no choice but to file for bankruptcy.

The company had originally hoped to shed some of its debt and keep operating. But after dismal holiday sales, the Toys “R” Us lenders began to question whether the company had a future and threatened to pull back on financing.