Work income is "sourced" where the work is actually (physically) performed. Thus income from the work you performed from a location in Massachusetts is MA-source income, and therefore taxable by MA - regardless of your employer's location.
You would report that income by filing a non-resident MA tax return, in addition to your home state tax return. Your home state can tax ALL your income, including the portion you earned in MA. You'll be able to claim an "other state credit" on your home state return for the taxes paid to MA, so you won't be double-taxed.
In TurboTax, be sure to complete the non-resident state return before the home state return, so that the program can calculate and apply the credit.
**Answers are correct to the best of my ability but do not constitute tax or legal advice.