You can’t contribute to a Health Savings Account once you’re enrolled in Medicare. This IRS rule should be considered when you have a Health Savings Account and want to sign up for Medicare A & B. (You sign up for Part A & Part B with Social Security).
Here is the information that Medicare offers on page 26 of their publication Enrolling in Medicare Part A & Part B about Health Savings Accounts. ( Remember that eligibility for Medicare based on age begins the month you turn age 65, when reading this sentence below: “Premium-free Part A coverage begins 6 months back from the date you apply for Medicare (or Social Security/RRB benefits), but no earlier than the first month you were eligible for Medicare.” The first month that you could be eligible for Medicare (based on age) is when you turn 65.)
“I have coverage through a health savings account (HSA)
What happens to my HSA when I sign up for Medicare?
You can’t contribute to your HSA once you’re enrolled in Medicare. If you contribute to your HSA after your Medicare enrollment date, you may have to pay a tax penalty. If you’d like to continue contributing to your HSA, you shouldn’t apply for Medicare, Social Security, or Railroad Retirement Board (RRB) benefits. Because your enrollment date for Medicare (i.e., when your coverage starts will generally be 6 months before your application date, you must stop contributing to your HSA 6 months before applying for Medicare.
Premium-free Part A coverage begins 6 months back from the date you apply for Medicare (or Social Security/RRB benefits), but no earlier than the first month you were eligible for Medicare.
To avoid a tax penalty, you should stop contributing to your HSA at least 6 months before you apply for Medicare.
You can only enroll in Part B at certain times. If you have an HSA with a High Deductible Health Plan (HDHP) based on your or your spouse’s current employment, you may be eligible for a Special Enrollment Period to enroll in Part B later without a lifetime late enrollment penalty. If you qualify, you can wait to enroll in Medicare until you (or your spouse) stop working or lose your employer group health plan coverage based on that employment.
You can withdraw money from your HSA after you enroll in Medicare to help pay for medical expenses (like deductibles, premiums, coinsurance, or copayments).”
The reason that Medicare advises you not to file for Social Security benefits either is because if you file for Social Security benefits at age 65 or older, it includes Medicare Part A coverage back to age 65 or 6 months back from the date you apply. Benefits cannot be separated from Medicare Part A coverage if you are 65 or older. You can file for Medicare only, but you cannot refuse Medicare Part A, if you are filing for Social Security monthly retirement benefits and are age 65 or older.
If you do not have a Health Savings Account with your employer, this is not a consideration for you. Those who do not have a Health Savings Account will sign up according to the enrollment rules in https://www.medicare.gov/Pubs/pdf/11036-Enrolling-Medicare-Part-A-Part-B.pdf .