Harvick's late challenge petered out when he ran out of fuel with less than two laps to go and coasted across the finish line in second place.
Hamlin had a disappointing 2011, when he finished ninth in the championship points standings following his second-place performance the previous year.
But he got 2012 off to a good start with his 18th career Sprint Cup win and his first at Phoenix.
Chipotle plans first price increase in 3 years
Disney's 'Jessie' to feature network's first engagement