Once you have separated from service, the plan must allow you to roll the balance in the plan over to an IRA. They must also allow you to do so by direct rollover to avoid tax withholding. It's up to the employer to define what is meant by no-longer employed, but once they consider you no longer employed and permit a rollover to another retirement account, nothing you do after the rollover affects the status of the rollover. They is no justification for them to retroactively make it a hardship distribution that is ineligible for rollover.
Once you have separated from service, the plan must allow you to roll the balance in the plan over to an IRA. They must also allow you to do so by direct rollover to avoid tax withholding. It's up to the employer to define what is meant by no-longer employed, but once they consider you no longer employed and permit a rollover to another retirement account, nothing you do after the rollover affects the status of the rollover. They is no justification for them to retroactively make it a hardship distribution that is ineligible for rollover.
As far as the IRS is concerned, you can roll funds from a 401k into a personal IRA whenever you want, regardless of employment status. Some 401k administrators will allow for an "in-service withdrawal", which just means you ask them to roll the funds into your own personal IRA. But assuming your intent is to simply roll funds from a 401k to an IRA, then the only limits on doing that are your employer and the 401k administrator.
For someone under age 59½, the only portion that can be distributed while still employed are amounts attributable to employer contributions (or to amounts rolled in from another plan). By law, in-service distributions of amounts attributable to employee elective deferrals or Roth contributions are *not* permitted to be distributed from the plan prior to the employee reaching age 59½, except as a hardship distribution and a hardship distribution is not eligible for rollover.
That's interesting. Seems like I've read otherwise, but as a practical matter it's a moot point since the 401k admin wouldn't allow it if the IRS doesn't.
§?401(k)(2)(B)(i): <a rel="nofollow" target="_blank" href="https://www.law.cornell.edu/uscode/text/26/401#k">https://www.law.cornell.edu/uscode/text/26/401#k</a>
Interesting. Learn something new every day.
I looked into this years ago and remember reading that it was allowable by the IRS, but most custodians don't allow it, and unfortunately mine didn't. Although maybe it was only the employer portion I was trying to withdraw. It's been awhile...
Thanks for the clarification.