Hansen was born in Copenhagen, Denmark. He won the 1997 Danish Amateur Stroke Play Championship and turned professional later that year. Hansen collected his first professional win at the Challenge Tour's 1998 Navision Open Golf Championship in his home country. Since 1999 he has been a member of the European Tour where he has picked up two tournament victories. He won the 2002 Murphy's Irish Open, where he won at the fourth extra hole in a play-off against Richard Bland, Niclas Fasth and Darren Fichardt. He also won the 2007 Mercedes-Benz Championship by a margin of four strokes. His best Order of Merit finish is 8th in 2007. He represented Europe in the 2008 Ryder Cup matches, but he did not win a match, the U.S. was victorious.