Before you jump to an answer or nasty comment, please give me a chance to elaborate.
Recently, I ran across an interesting article in the Bogleheads Wiki titled Placing Cash Needs in a Tax-Advantaged Account. Essentially, because of the way the U.S. tax code works it can often be better to keep certain asset classes like cash inside tax-advantaged accounts like IRAs and 401ks. Therefore, if your emergency fund is cash, why not put it inside as well?
I’ll use the example given. Let’s say you have a 401(k) with a balance of $10k and also taxable assets of $10k, for $20,000 total. You choose to have $10k in stocks, $5k in bonds, and $5k in cash for your emergency account. The “traditional” placement for an emergency fund is in your regular taxable account, perhaps in a bank savings account. The rest of the assets are distributed according to this tax-efficient placement chart.

However, in this scenario all your interest earned on your cash will be taxed at your marginal ordinary income tax rate, which can be as high as 35%. See table of 2009 Marginal Tax Rate Brackets. Meanwhile, your stocks will mostly give off dividends, which are taxed at a current maximum rate of 15%, and possibly quite less. So why not put the cash into the 401k?

Emergency!
You may wonder what happens if you do need access to that $5,000. You would simply sell $5,000 of the stocks in your taxable account, and simultaneously buy $5,000 of stocks in your 401k plan. This way, your final asset allocation will look exactly the same as if you just spent your cash from the traditional setup:

If you happen to sell your stocks at a loss, then you may be able to deduct a loss if you avoid a wash sale. You can do this by not purchasing a “substantially identical” security within 30 days, but you can buy something very similar. For example, you might buy the S&P 500 ETF (IVV) and sell the Russell 1000 ETF (IWB). They are very strongly correlated, as shown in this chart. This may or may not be worth the hassle depending on how big a loss you’re looking at.
If you happen to sell your stocks at a long-term gain, then you’ll again only paid long-term capital gains taxes of at most 15%. If you sell at a short-term gain (held less than a year), then you’ll have to pay ordinary taxes on the gain. So it might be good to wait a year to institute this new setup.
The Catch
So there you have it, there is an argument for some people to put their emergency funds into their 401ks! However, for most people I don’t think this idea is very practical. For one, most people have relatively small emergency funds, so the difference in taxation scenarios won’t be very high. This is especially true in the current low-interest rate environment. The highest potential tax savings would go to those with large 401k balances and high income tax brackets.
Finally, besides a few stable value funds that I’ve seen, the yields on money market funds found inside retirement plans are rarely the best available. I can usually find much higher interest rates outside my 401k, usually by at least 2% APY or more.
Read more about Should You Keep Your Emergency Fund In Your 401k?…