The Copenhagen City Court says Hansen was found guilty of tax evasion from 2002 to 2006. He had claimed residency in tax-haven Monaco during the period.
The court on Wednesday ruled Hansen actually lived in Denmark and avoided Danish taxes.
It was unclear whether the ruling would be appealed.
The 36-year-old Hansen has represented Denmark in the World Cup five times.
In 2007, he reached the top 50 in the world rankings and became the top-ranked Danish golfer. A year later, he represented Europe in the Ryder Cup.