Anything you withdraw from your 401k will be fully taxable at your ordinary income tax rate plus a 10% penalty. You may be able to avoide the penalty under these circumstances:
If your plan allows you to take a loan
If you can replace the funds within 60 days
If you roll the 401k into an IRA then use Rule 72T to take the withdrawal.