Brendan McDermid/Reuters

Federal regulators have discovered that hundreds of millions of dollars in customer money has gone missing from MF Global in recent days, prompting an investigation into the brokerage firm, which is run by Jon S. Corzine, the former New Jersey governor, several people briefed on the matter said on Monday.

The recognition that money was missing scuttled at the 11th hour an agreement to sell a major part of MF Global to a rival brokerage firm. MF Global had staked its survival on completing the deal. Instead, the New York-based firm filed for bankruptcy on Monday.

Regulators are examining whether MF Global diverted some customer funds to support its own trades as the firm teetered on the brink of collapse.

The discovery that money could not be located might simply reflect sloppy internal controls at MF Global. It is still unclear where the money went. At first, as much as $950 million was believed to be missing, but as the firm sorted through its bankruptcy, that figure fell to less than $700 million by late Monday, the people briefed on the matter said. Additional funds are expected to trickle in over the coming days.

But the investigation, which is in its earliest stages, may uncover something more intentional and troubling.

In any case, what led to the unaccounted-for cash could violate a tenet of Wall Street regulation: Customers’ funds must be kept separate from company money. One of the basic duties of any brokerage firm is to keep track of customer accounts on a daily basis.

Neither MF Global nor Mr. Corzine has been accused of any wrongdoing. Lawyers for MF Global did not respond to requests for comment.

Now, the inquiry threatens to tarnish further the reputation of Mr. Corzine, the former Goldman Sachs executive who had sought to revive his Wall Street career last year just a few months after being defeated for re-election as New Jersey’s governor.

When he arrived at MF Global — after more than a decade in politics, including serving as a Democratic United States senator from New Jersey — Mr. Corzine sought to bolster profits by increasing the number of bets the firm made using its own capital. It was a strategy born of his own experience at Goldman, where he rose through the ranks by building out the investment bank’s formidable United States government bond trading arm.

One of his hallmark traits, according to the 1999 book “Goldman Sachs: The Culture of Success,” by Lisa Endlich, was his willingness to tolerate losses if the theory behind the trades was well thought out.

He made a similar wager at MF Global in buying up big holdings of debt from Spain, Italy, Portugal, Belgium and Ireland at a discount. Once Europe had solved its fiscal problems, those bonds would be very profitable.

But when that bet came to light in a regulatory filing, it set off alarms on Wall Street. While the bonds themselves have lost little value and mature in less than a year, MF Global was seen as having taken on an enormous amount of risk with little room for error given its size. By Friday evening, MF Global was under pressure to put up more money to support its trading positions, threatening to drain the firm’s remaining cash.

The collapse of MF Global underscores the extent of investor anxiety over Europe’s debt crisis. Other financial institutions have been buffeted in recent months because of their holdings of debt issued by weak European countries. The concerns about MF Global’s exposure to Europe prompted two ratings agencies to cut their ratings on the firm to junk last week.

The firm played down the effect of the ratings, saying, “We believe that it bears no implications for our clients or the strategic direction of MF Global.”

Even by Sunday evening, MF Global thought it had averted its demise after a disastrous week. Over five days, the firm lost more than 67 percent of its market value and was downgraded to junk status, which prompted investor desertions and raised borrowing costs.

Mr. Corzine and his advisers frantically called nearly every major Wall Street player, hoping to sell at least some of the firm in a bid for survival.

On Friday, the asset manager BlackRock was hired to help MF Global wind down its balance sheet, which included efforts to sell its holdings of European debt. BlackRock was able to value the portfolio, but did not have time to find a buyer for it given the other obstacles MF Global faced, according to people close to the talks.

By Saturday, Jefferies & Company became the lead bidder to buy large portions of MF Global, before backing out late in the day.

On Sunday, a rival firm, Interactive Brokers, emerged as the new favorite. But the Connecticut-based firm coveted only MF Global’s futures and securities customers.

While MF Global was resigned to putting its parent company into bankruptcy, Interactive Brokers was also willing to help prop up other MF Global units, including a British affiliate.

By late Sunday evening, an embattled MF Global had all but signed a deal with Interactive Brokers. The acquisition would have mirrored what Lehman Brothers did in 2008, when its parent filed for bankruptcy but Barclays of Britain bought some of its assets.

But in the middle of the night, as Interactive Brokers investigated MF Global’s customer accounts, the potential buyer discovered a serious obstacle: Some of the customer money was missing, according to people close to the discussions. The realization alarmed Interactive Brokers, which then abandoned the deal.

Later on Monday, when explaining to regulators why the deal had fallen apart, MF Global disclosed the concerns over the missing money, according to a joint statement issued by the Commodity Futures Trading Commission and the Securities and Exchange Commission. Regulators, however, first suspected a potential shortfall days ago as they gathered at MF Global’s Midtown Manhattan headquarters, the people briefed on the matter said. It is not uncommon for some funds to be unaccounted for when a financial firm fails, but the magnitude in the case of MF Global was unnerving.

For now, there is confusion surrounding the missing MF Global funds. It is likely, one person briefed on the matter said, that some of the money may be “stuck in the system” as banks holding the customer funds hesitated last week to send MF Global the money.

But the firm has yet to produce evidence that all of the $600 million or $700 million outstanding is deposited with the banks, according to the people briefed on the matter. Regulators are looking into whether the customer funds were misallocated.

With the deal with Interactive Brokers dashed, MF Global was hanging in limbo for several hours before it filed for bankruptcy. The Federal Reserve Bank of New York and a number of exchanges said they had suspended MF Global from doing new business with them.

It was not the first time regulators expressed concerns about MF Global.

MF Global confirmed on Monday that the Commodity Futures Trading Commission and the S.E.C. — had “expressed their grave concerns” about the firm’s viability.

By midmorning on Monday, the firm filed for bankruptcy.

Azam Ahmed contributed reporting.