Yes, the gain from the sale of property in Illinois is subject to Illinois tax. Since you are a New York resident, all your income is subject to New York tax, no matter where the income is from. You have to file an Illinois nonresident tax return in addition to your New York resident tax return. You will get a credit on your New York tax return for part or all of the tax that you pay to Illinois. Prepare your Illinois nonresident tax return first, then your New York resident tax return, to make sure that the credit is calculated correctly.