Since 1995 Hacker has been a member of the FDP. From 2008 until 2013, he served as a member of the Landtag of Bavaria. During that period, he chaired the FDP parliamentary group.