A friend was released from their job after 4 years, not vested. I understand 5 years are required to be vested.
Are they entitled to the contributions they made to the 401(k)?
Yes. Any contributions you make to your own 401(k) are yours - irrespective of when the contributions were made.
Contributions made to your 401(k) by your employer might be subject to a vesting schedule, in which case you may own all, some or none of them - depending on the vesting schedule and period of time since the contributions were made.
As others have noted, you are always immediately vested in your own contributions.
For employer contributions, it is not legal to be totally unvested after 4 years of full-time service. If they have cliff (all or nothing) vesting, it must vested by 3 years. If they use graded vesting, it must be at least 60% vested by 4 years.
The cliff vs graded requirements are described here: https://www.irs.gov/retirement-plans/plan-participant-employee/retirement-topics-vesting
Just because you are fired/quit/retire you don't lose access to logging into the 401(k) website.
As has been said already you own 100% of your contributions, but you own someplace between 0 and 100% of the companies contributions.
There are two places to look: on the website, and on any documentation you have from the company.
In places where I worked where there was a vesting schedule the account balance page could be configured to show the vested and unvested parts of the account. It can also be seen on a quarterly statement. That would tell you how much is vested, but it might not tell you when you will reach 100% vesting.
Counting years can be tricky. I have known companies to award a year as soon as you reach 850 hours in the calendar year. If you started in the middle of a calendar year you could hit "5 years" by your 4th anniversary.
You will note that if you were given "online" (app or website) access to your 401K account, this is a completely different credential at a completely different internet domain. For instance my employer conducted business at
www.example.com but my 401(k) portal was at
The company instantly disabled your company logins, however your 401(k) login still works and the money shows as still there.
A 401(k) is akin to a "group-plan IRA", and it grants higher contribution limits. It is still your money. You must still manage it, e.g. pick appropriate mutual funds etc.
Some companies will often do a company "match" - you put in $400, they put in an additional $100. They sometimes have "vesting rules" for this, which cancels the match if you quit too soon afterwards. That may be what you're talking about, but separate to that is stock option vesting.
If you took a loan from your 401(k), when you leave the company it must immediately be paid back, or the loan is paid using 401K funds. That might seem like a vesting issue.
Every broker on earth would love to "help you" move the money out of the 401K, and into their "tender care". This is a ripoff. Their goal is to put you into their high-cost investments which pay them big sales commissions.
For instance if you are in a Vanguard 401(k) with $100,000 in fund VFINX, which costs you $140/year in fund expenses. A broker will want to put you into AMRMX, with a $5750 "entry fee" and $570/year fund expenses. That's super bad for you - given how compounding works, that'll be $40,000 less in 40 years. AMRMX gets $570/year and your broker gets $5750 commission!!!
The company currently offering your 401(k) will also be naughty. They will send you letters rigged to sound like you're obliged to move the money. Read closer, it's not true. Again, they're hoping to move you into other investments that are more lucrative for them.
Because of these constant sales-jobs, people often become misled into thinking a 401(k) isn't their money (it is) or that they must move funds out of the 401(k) (they needn't).
I would suggest either
Roth 401(k)s are a thing... but only if your plan offers that.
In addition to other answers: even though one have access to the former employer's 401(k), it might make sense to roll it over to an IRA or 401(k) provided by the current employer. Things to consider are the fees (which could suddenly get higher when one leaves the company), and quality/variety of investment options the plan offers. Also, I find it convenient to keep the number of my retirement accounts low, and keep all of them in one place.