If you leave your employer for any reason, you have some choices to make with regards to your CalPERS benefits.
Less Than 5 Years of Service Credit
If you have less than five years of service credit on deposit with CalPERS, you will be required to withdraw your contributions. You must forfeit the employer portion of your account which was supposed to help fund your monthly retirement benefits.
If you roll over the CalPERS to an IRA or 401(k) retirement account, you will not have to pay any taxes if the funds are rolled over directly to the new plan.
If the check is in your name, you will have 20% of the funds withheld for taxes. This means you will have to make up the difference out of your own pocket if you intend to do a 401k rollover or IRA rollover and get a refund from the IRS for the 20% that was withheld.
If you deposit the check into your bank account without rolling over the funds to an IRA or 401k account, you will pay federal and state income taxes plus a 10% penalty on the funds.
More Than 5 Years of Service Credit
If you have more than 5 years of service credit, you may withdraw your CalPERS account in the manner described above. Keep in mind that you still forfeit the amount employer contribution.
Instead of withdrawing from your account, you can keep it on deposit with CalPERS until age 50 which is the minimum age to get monthly retirement benefits. The employer contribution helps fund these monthly benefits and any enhancements negotiated by your union and employer such as an annual COLA.
If you are leaving your employer due to disability, ask CalPERS about the possibility of going on a disability retirement. You will need at least 5 years of service credit to qualify.