The move must be closely related to your work, be it starting a new job or moving to a new job location. The Time Test states that you must start the new job within a year of the move and you must work full time for at least 39 weeks of the first 12 months, or at least 78 weeks of the first 24 months if you're self-employed. The Distance Test states that your new main job location is at least 50 miles farther from your former home than your previous job location was. (For example, let's say you lived and worked in Galveston with a 2 mile commute. You picked up a new job in Conroe, which is 91 miles from your Galveston house. So, 91-2 = 89, which is 50 miles or greater and meets the Distance Test.)
So now that you've met the requirements to take the deduction, what can you deduct? In short, Travel, Packing/Shipping, and some Utility expenses are deductible on Form 3903. Travel includes the cost of a one-way trip for each individual of the household. Specifically mileage (use the mileage deduction), airfare, hotels, parking fees and toll road charges are included. Packing and shipping include the costs of boxes and other packing materials, transporting the household items and if storage is needed because the house isn't ready, then storage can be included as well. Finally, the costs incurred with turning off and turning on utilities are deductible.
If your employer reimburses you for any moving expenses, then your deduction is decreased by that amount.