Why Can't You Contribute to an HSA Once You're Enrolled in Medicare?
Someone who keeps working past the age most people retire, and who’s still covered by a workplace health plan, can run into a rule that surprises a lot of people: enrolling in Medicare, even while still employed, generally shuts the door on new HSA contributions.
The short answer
Contributing to an HSA requires being covered by a qualifying high-deductible health plan and having no other type of health coverage that pays first-dollar or broader benefits, and Medicare counts as that kind of other coverage. Once enrolled in any part of Medicare, a person generally can no longer make new contributions to an HSA, even if they keep the high-deductible plan through an employer and keep working. The account itself doesn’t disappear or lose its funds, only new contributions are affected.
Why the two don’t mix
An HSA is built around eligibility rules that require the account holder to be covered exclusively by an HDHP, without other coverage that would reduce or replace the deductible structure that makes it “high-deductible” in the first place. Medicare is a separate, comprehensive coverage program, and once someone is enrolled in it, they’re considered to have that other qualifying coverage, which disqualifies them from the HSA-eligible category regardless of what other coverage they’re also carrying. This isn’t a penalty or a judgment about the plan itself, it’s simply how the eligibility definition is written.
The timing trap for people who work past retirement age
This creates a real planning wrinkle for anyone who intends to keep working and stay on an employer’s high-deductible health plan past the age most people become eligible for Medicare. Medicare Part A enrollment, in particular, is often triggered automatically for people who’ve started collecting Social Security, and that enrollment can be backdated by several months once it happens, which means contributions made during that retroactive window can end up being non-qualified after the fact. Someone who wants to keep contributing to an HSA while working later in life generally needs to actively delay Medicare enrollment, which is possible for people still covered by a qualifying employer plan, but requires deliberate coordination with the employer’s benefits timeline rather than letting enrollment happen automatically.
What still works after enrollment
None of this affects money already sitting in the HSA. Existing funds keep growing, and they can still be used for qualified medical expenses tax-free, and even for non-medical expenses under the same tax treatment that applies to other HSA withdrawals later in life. What changes is strictly the ability to add new money to the account going forward; an HSA holder who enrolls in Medicare simply becomes a spender of the existing balance rather than a contributor, which is also part of why some people treat the HSA as a specialized retirement account they stop funding once Medicare starts.
What to weigh
Anyone planning to work past the usual retirement age and wanting to keep contributing to an HSA has to weigh the value of continued contributions against the practical reality of Medicare’s enrollment timing rules, including the retroactive coverage window tied to Social Security. Because these are federal rules that can be revised over time, checking the current eligibility details before making contributions in the months surrounding a Medicare enrollment decision is worth the extra step.