Fogh has been involved in the politics of Denmark since high school and was elected to Parliament right after graduating from college. In the Liberal Party he has held many posts, including chairman of the education committee, vice-chairman on the national organization, and vice chairman of the housing committee. His first ministerial post came in 1987 when he served as minister for taxation, an area of great interest to the economist. He served in that ministry until 1990 when he took over the ministry of economic affairs, which he led until 1992. Fogh did not hold any ministerial posts again until becoming prime minister in 2001. During his time out of government, he served as spokesman for his party and held various high posts within it.
In 2001, then-prime minister Poul Nyrup Rasmussen called for parliamentary elections to be held in November, even though they were not due until March 2002. It was reported that Nyrup feared electoral defeat and saw in the political solidarity that followed the terrorist attacks on the United States in September an opportunity to hold onto power. Like much of Western Europe in the late twentieth and early twenty-first centuries, however, the Danish electorate had been moving to the right on issues like taxation and immigration. Also contributing to the defeat of Nyrup was a simple desire for change after nine years of his administration. Fogh's Liberals won 31% of the vote (56 seats in Parliament); Nyrup's Social Democrats won 29% (52 seats); the far-right Danish People's Party took a stunning 12% (22 seats), and the Conservatives won 9% (16 seats). It was the first time since 1920 that the Social Democrats had not held the most seats. Fogh formed a coalition with the Conservatives.