This is an unusual situation. It is not clear to me that the translation of earned income to unearned income (which is what happened to your HSA contributions) should be allowed to trigger the 8615, ...
See more...
This is an unusual situation. It is not clear to me that the translation of earned income to unearned income (which is what happened to your HSA contributions) should be allowed to trigger the 8615, but to be fair, you could argue it both ways. You may want to consult your own tax professional for his/her opinion (yes, we Intuit employees are tax professionals in the Community, but we are not doing your return - not like TurboTax Full Service where a TurboTax tax professional does your return and signs it).
Tell me, are you one really good terms with your employer? I have a way of perhaps working around your issue.
Can you ask your employer to reissue a corrected W-2 with no code W (and no amount), and with your Wages in boxes 1, 3, and 5 increased by the amount of the code W amount. This would have been what your W-2 would have looked like if there had been no HSA contributions through your employer.
Obviously, you will now have the amount of the excess in hand because of the withdrawal, so it is only fair that you owe income tax on it. But with the corrected W-2, the HSA contribution will appear to be earned income, not unearned.
You will have a 1099-SA which is no longer valid, but I doubt you can fix that. The HSA custodian will want the money back from the withdrawal if they agree to consider the 1099-SA a "mistaken distribution" which would fix their paperwork, so you would end up being taxed on income you no longer have.