NH does not tax earned income. It taxes only interest and dividends above certain amounts.
You will have to file a part-year resident MA tax return for the year in which you move out of MA. If you neither live in nor work in MA after the move, then you would no longer have a need to withhold MA taxes after that point.
ALL your income during your time as an MA resident is taxable by MA.