Generally your move must be closely related to when you start work. You should be safe if moving expenses were incurred within one year from the date you first reported to a new location to fit within the intent of “closely related in time to the start of work.” Additionally:
Your new main job location needs to be at least 50 miles farther from your former home than your previous job location was.
You must work full time for at least 39 weeks during the first 12 months after you arrive in the general area of your new job location, or at least 78 weeks during the first 24 months if you are self-employed. If your income tax return is due before you’ve satisfied this requirement, you should still be able to deduct your allowable moving expenses if you expect to meet the time test in the following years.
You can deduct lodging expenses for yourself and household members while moving from your former home to your new home. You can also deduct transportation expenses, including airfare, vehicle mileage, parking fees and tolls you pay to move, but you can only deduct one trip per person.
You can deduct the cost of packing, crating and transporting your household goods and personal property. You may be able to include the cost of storing and insuring these items while in transit but be prepared to substantiate a reasonable need for doing this. You can also deduct the costs of connecting or disconnecting utilities. If your employer reimburses you for the cost of the move, the reimbursement may have to be included on your income tax return.
You cannot deduct as moving expenses: any part of the purchase price of your new home, car tags, drivers license, costs of buying or selling a home, expenses of entering into or breaking a lease, security deposits and storage charges except those incurred in transit.