Yes, individuals diagnosed with cancer can withdraw from their 401(k) if necessary. However, early withdrawals (before age 59½) typically incur a 10% penalty in addition to income taxes. Some exceptions allow for penalty-free withdrawals, such as a severe medical condition including cancer, under the hardship withdrawal rules. Consult with your plan administrator and a financial advisor to understand the specific criteria and processes.