It may be taxable by both. A work-related payment is typically taxable by the state where the work was performed. If you received the payment after becoming a resident of a second state, it would typically also be taxed there - on the principle that your State of Residence can tax all your income.
In those situations you'd normally be able to claim a credit on your current resident state's return for the tax paid to the non-resident state, so as to avoid double taxation.