As you may already know, you must meet certain requirements, as outlined in the 401(k) plan document, to be considered eligible to receive a distribution from the plan. Your employer or plan administrator will provide you with a list of the requirements.
Amounts withdrawn from your 401(k) plan and used toward the purchase of your home will be subject to income tax and a 10% early-distribution penalty (if you're under the age of 59½). Even though the distribution will be used towards the purchase of your first home, the first-time homebuyer exception does not apply to distributions from qualified plans such as the 401(k). Furthermore, if the amount you receive is rollover eligible, your employer is required by law to withhold 20% of it for federal income tax.
Assuming you are eligible to receive the distribution and the amount is rollover-eligible, you may instruct the 401(k) plan to process your distribution as a direct rollover to an IRA. This will ensure that the 20% federal tax withholding is not applied to the amount. Additionally, you can then withdraw the amount from your IRA for use towards the purchase of your first home, thereby avoiding the 10% early-distribution penalty. Remember, the maximum amount that may be distributed from the IRA on a penalty-free basis for the purpose of buying a first home is $10,000. This is a lifetime limit.
If you are under age 59½ when the distribution occurs, your IRA custodian may report the distribution as being eligible for an exception to the 10% penalty. This is indicated with a code "2" in box 7 of Form 1099-R. If the custodian does not make this indication, you may file IRS Form 5329 to claim the exception.
You can also consider not taking a distribution from your 401(k) and instead just borrowing from it (see How can I take a loan from my 401(k)?).
This question was answered by Denise Appleby.