Tax Law, § 632(b)(1)(B)
Where an individual formerly employed in New York State is retired from service and thereafter receives a pension or other retirement benefit attributable to his former services, the pension or retirement benefit is not taxable for New York State personal income tax purposes if the individual receiving it is a nonresident and if it constitutes an annuity as defined in paragraph (2) of this subdivision. Where a pension or other retirement benefit does not constitute an annuity, it is compensation for personal services and, if the individual receiving it is a nonresident, it is taxable for New York State personal income tax purposes to the extent that the services were performed in New York State. The term compensation for personal services as used in the foregoing sentence includes, but is not limited to, amounts received in connection with the termination of employment, amounts received upon early retirement in consideration of past services rendered, amounts received upon retirement for consultation services, and amounts received upon retirement under a covenant not to compete. For allocation rules, see section 132.20 of this Part.
To qualify as an annuity, a pension or other retirement benefit must meet the following requirements:
Prizes, awards and similar payments are derived from or connected with New York State sources as long as they are incidental to the nonresident's presence or other activities in New York State.
N.Y. Comp. Codes R. & Regs. Tit. 20 § 132.4