The IRS will allow a “hardship withdrawal” from a 401K account under an “immediate and heavy” financial need. All other options must have been exhausted before you can make such a withdrawal. Information can be at How to Use a 401K to Pay for College Tuition or by speaking with your financial advisor.