1) You can borrow against a 401K (depending upon plan structure) and use the proceeds of that borrowing to use as a down payment for a house. The interest paid on the 401K loan will go back into your 401K, but that interest will not be tax deductible, it will be post tax as will principal payments against that 401K loan. My understanding is that during that period that you have the loan out.. you can’t use the amount for investing in the 401K because it will be tied up in a loan to yourself.
*) Risks.. if you change jobs or get laid off, the amount that was borrowed has to be paid back in very short order (either 30 or 60 days.. before it is considered a ‘distribution’ and you get hit with taxes)
2) Take a distribution.. taxed at income rate AND 10% penalty.
3) Hardship case can prevent fees, and possibly income taxes.. but it will be very difficult to prove if it is being used as a down payment on a house.
** There may be other ways to use a 401K in this manner, but I don’t know what they are off hand.