You cannot contribute to a health savings account once you enroll in Medicare, regardless of your age. The key factor is Medicare enrollment, not turning 65. Many people assume HSA contributions must stop at age 65, but this is incorrect. If you are 65 or older and have not enrolled in Medicare while maintaining qualifying high-deductible health plan coverage, you can continue making HSA contributions.
HSA contribution eligibility requires having a high-deductible health plan and not being enrolled in Medicare Part A or Part B. Some people delay Medicare enrollment past age 65 if they have creditable employer coverage, allowing continued HSA contributions during this period.
Once you do enroll in Medicare, HSA contributions must cease immediately, but you retain full ownership of your existing HSA funds. You can continue using these funds for qualified medical expenses at any time. After age 65, you gain additional flexibility to withdraw HSA funds for non-medical expenses without the 20% penalty, though regular income tax still applies to non-medical withdrawals.