Around 2000, a friend of mine had the good fortune of selling his business for $100 million. Actually, it was not a dot-com (he could barely use a computer). No, he built a thriving company in a traditional industry: shredding.

Of course, it did not take long for an accounting firm to contact him with a can't-miss tax shelter. At the time, he said to me: "It's too good to be true."

Well, apparently he was right. Now, he is the subject of an extensive IRS audit and could be financially crippled because of litigation costs, back interest, penalties, and back taxes.

In fact, this week, KPMG agreed to a massive $456 million settlement with federal prosecutors over "abusive tax shelters." These were quite popular from 1995 to 2002, when many executives and company founders got rich from IPOs, buyouts, and stock options. These tax shelters were exceedingly complex, involving offshore trusts and sophisticated investment structures (such as futures). Names for these structures included things such as bond-linked issue premium structure (BLIPS), foreign leveraged investment program (FLIP), offshore portfolio investment strategy (OPIS), and so on. But the result was always the same: Pay little, if any, taxes.

Prosecutors could have destroyed KPMG by bringing a criminal indictment against the firm. But, as seen with Arthur Andersen, it does not make a lot of sense to cause such havoc. As it goes for KPMG's ongoing operations, the important implication is that its previously lucrative tax practice will face severe limitations. The upside is that regulatory authorities have left KPMG's audit business virtually untouched and major customer defections are not looming, allowing the company to survive on an ongoing basis.

But prosecutors certainly understood their inherent leverage and used it effectively against KPMG. In the end, KPMG agreed to a deferred-prosecution agreement. That is, the firm must meet specified restrictions. If there is a lapse, the firm will be indicted. As a condition, Richard Breeden, who was the chairman of the Securities and Exchange Commission and served the same role at WorldCom, will monitor KPMG.

What's more, KPMG will cooperate with federal prosecutors in its criminal investigation against former KPMG employees, as well as others who participated in the fraud (such as bankers and lawyers).

Given the proverbial bit of 20/20 hindsight, this may be the most powerful weapon in the Department of Justice's effort to deter similar activity going forward -- that is, bringing severe penalties against the individuals involved in the crimes. To this point, it's been rare for tax advisors to get prosecuted over abusive tax shelters. A contributing factor is the simple fact that these cases are highly complex and difficult for the DOJ to prosecute. To be sure, the U.S. government will not have an easy run, though KPMG's cooperation will help.

Yesterday, federal prosecutors indicted eight people involved in the KPMG tax shelters, including the former chairman of the firm. Such actions likely will have a big impact on the accounting profession. No doubt, tax professionals will be more cautious when constructing new tax shelters.

So far, KPMG will survive. While it is still the smallest of the Big Four, the firm is nonetheless large. Last year, the firm posted over $12 billion in revenues.

Yet the firm will be mired in expensive civil litigation for many years. And it will no longer be able to pursue its high-net-worth tax practice. The $456 million settlement will mean less investment in its business, as well. In other words, KPMG will be an even weaker No. 4. In today's post-Enron climate, that's the cost of doing bad business.

Fool contributor Tom Taulli does not own shares mentioned in this article.