If you’re active-duty military and were ordered to move as the result of a PCS (permanent change of station), you can deduct your out-of-pocket moving expenses to your new post, including travel and lodging (but not meals). You can't deduct moving expenses for which you were reimbursed, nor can you deduct moving expenses that were paid for by the government.
California Non-military Members
If you move to a new home because of a new principal workplace, you may be able to deduct your moving expenses whether you are self-employed or an employee. But you must meet both the distance and time tests that follow prior to completing line 1 through line 5 of form FTB 3913. Also, your move must be closely related both in time and place to the start of work at your new job location. See this article for more information.
For New York income tax purposes, you can claim qualified moving expense reimbursement amounts (as defined under IRC § 132(g) as it existed prior to the Federal Tax Cuts and Jobs Act) you received (directly or indirectly) from an employer as payment for, or a reimbursement of, moving expenses (defined below) that you paid directly. You cannot claim any payment for, or reimbursement of, a moving expense actually deducted by you in a prior year.
For everybody else, no, you can't deduct moving expenses.