During the 12th century AD the von Hasenburg family acquired Asuel in the Willisau area. The patronage rights of the Willisau church and the use of a bailiwick within the grand parish of Willisau provided for a substantial income. As privileged vassals and tax-collectors for the House of Habsburg the Hasenburgs' sphere of influence expanded, although they never were granted the title of count.
From spring 1302 to summer 1303, Markward, Heimo and Walter von Hasenburg created the town of Willisau. The existing village was cleared, and the new town counted 150 inhabitants. Possessing a town was a status symbol for the Hasenburgs. The administrative seat of the Hasenburgs was an elevated medieval castle at the base of the mountain, which was later destroyed in the time of the Battle of Sempach. Newer archaeological findings indicate that Willisau already exhibited urban characteristics before its formal foundation.
The town of Willisau developed at the end of the Middle Ages. The town was surrounded by arable land and its inhabitants included many craftsmen. Willisau became a crafts centre and commercial city during the 16th century, although a devastating fire in 1704 decimated its prosperity. It took pride in its location on the most direct route from Lucerne to Berne and western Switzerland.
Willisau had received market rights already in 1330. In the first four decades after the founding of town, the Habsburgs kept a firm rule. Among the descendants (1367–1407), living outward, the urban district had substantial liberties, which led to the emergence of an administrative upper class. The new national rule in Lucerne allowed for citizens of a town to return certain privileges and administrative authority, even if the competencies were noticed by the bailiff. Thus Willisau became appended to a smaller feudal dominion and under the rule of Lucerne it developed to an administrative centre of a relatively large territorial district.
On maps older than 1 January 2006, Willisau appears as two separate political municipalities: Willisau Stadt (the city, 337 hectares) and Willisau Land (countryside, 3771 hectares).
During the 17th and 18th centuries poverty was a common plight. Taxation edicts were intended to allow the community to support these poor. Willisau taxes did howevernot serve this purpose because the citizens of the city could supply their needs with yields from a hospital and a nursing home, and were unwilling to aid those outside the city. Thus a special tax edict was developed in 1763 in addition to internal taxes in order to help support people outside the city. Subsequently there was discord because the privileged townspeople felt they owned the common land and restricted the usage of wood from surrounding forests.
In 1798, the municipalities' assessment areas were changed and in 1803 these two municipalities became autonomous. The city borders were redrawn in 1807 and 1876. For the inhabitants of outlying areas, the city remained a meeting center.
On 25 January 2004, the population of both municipalities voted for a reunification. So, on 1 January 2006 the formerly separate municipalities of Willisau Stadt and Willisau Land merged into the municipality of Willisau.
The Willisau parish possessed a church prior to the town's founding. The late Roman church tower dates from the 13th century. Today's church has extensive classicist columns dating to 1805–10, and was designed by Josef Purtschert. It is the most important building within the old part of town. On the occasion of the church's renovation in 1929, a solid bell carrier was put onto the church roof, which experts today consider an architectural achievement in reinforced concrete construction. Apart from refurbishments and modernizations, the interior of the church was restored to its original state in 1996.
Originally a wooden chapel, the Holy Blood Church before the upper town's gate was turned into a stone building in 1497. In 1675 it was redesigned in a Renaissance style. The name is reminiscent of a legend of three sinful card players and the devil which dates back to a crimeon 7 July 1392.
Willisau has an area of 41.11 km2 (15.87 sq mi). Of this area, 26.16 km2 (10.10 sq mi) or 63.6% is used for agricultural purposes, while 11.39 km2 (4.40 sq mi) or 27.7% is forested. Of the rest of the land, 3.29 km2 (1.27 sq mi) or 8.0% is settled (buildings or roads), 0.22 km2 (0.085 sq mi) or 0.5% is either rivers or lakes and 0.12 km2 (30 acres) or 0.3% is unproductive land.
Of the built up area, housing and buildings made up 4.2% and transportation infrastructure made up 2.2%. Out of the forested land, 24.9% of the total land area is heavily forested and 2.8% is covered with orchards or small clusters of trees. Of the agricultural land, 13.4% is used for growing crops and 48.5% is pastures, while 1.7% is used for orchards or vine crops. All the water in the municipality is flowing water.
Willisau has a population (as of December 2016) of 7,777. As of 2008, 8.1% of the population are resident foreign nationals. Over the last 10 years (2000–2010) the population has changed at a rate of 2.3%. Migration accounted for 0%, while births and deaths accounted for 1.3%. Most of the population (as of 2000) speaks German (94.5%) as their first language, Albanian is the second most common (2.3%) and Serbo-Croatian is the third (0.7%).
As of 2008, the population was made up of 6,620 Swiss citizens and 586 non-citizen residents (8.13% of the population). As of 2000, children and teenagers (0–19 years old) make up 25.4% of the population, while adults (20–64 years old) make up 59% and seniors (over 64 years old) make up 15.7%.
As of 2009, the construction rate of new housing units was 1.8 new units per 1000 residents. The vacancy rate for the municipality, in 2010, was 0.49%.
The historical population is given in the following chart:
The Old City, the Catholic church of St. Peter and Paul, the Landvogteischloss (Bailiff's Castle) and the pilgrimage chapel of Heiligblut are listed as Swiss heritage site of national significance. The entire town of Willisau is part of the ISOS.
In the 2007 federal election the most popular party was the CVP which received 38.72% of the vote. The next three most popular parties were the FDP (25.17%), the SVP (20.77%) and the SPS (7.34%). In the federal election, a total of 3,243 votes were cast, and the voter turnout was 61.9%.
As of 2010, Willisau had an unemployment rate of 1.3%. As of 2008, there were 538 people employed in the primary economic sector and about 195 businesses involved in this sector. 1,064 people were employed in the secondary sector and there were 85 businesses in this sector. 2,497 people were employed in the tertiary sector, with 261 businesses in this sector.
In 2008 the total number of full-time equivalent jobs was 3,170. The number of jobs in the primary sector was 342, of which 339 were in agriculture and 4 were in fishing or fisheries. The number of jobs in the secondary sector was 987 of which 605 or (61.3%) were in manufacturing and 378 (38.3%) were in construction. The number of jobs in the tertiary sector was 1,841. In the tertiary sector; 479 or 26.0% were in wholesale or retail sales or the repair of motor vehicles, 82 or 4.5% were in the movement and storage of goods, 103 or 5.6% were in a hotel or restaurant, 113 or 6.1% were in the information industry, 88 or 4.8% were the insurance or financial industry, 148 or 8.0% were technical professionals or scientists, 269 or 14.6% were in education and 337 or 18.3% were in health care.
Of the working population, 9.3% used public transportation to get to work, and 52.2% used a private car.
In Willisau about 47.7% of the population have completed non-mandatory upper secondary education, and 18.2% have completed additional higher education (either university or a Fachhochschule).
The Canton of Lucerne school system may provide one year of non-obligatory Preschool and always provides one year of obligatory Kindergarten, followed by six years of Primary school. This is followed by three years of obligatory lower Secondary school where the students are separated into four levels according to ability and aptitude. Following the lower Secondary students may attend additional schooling or they may enter an apprenticeship.
During the 2009-10 school year, there were a total of 1,102 students attending classes in Willisau. There were 5 kindergarten classes with a total of 89 students in the municipality. Of the kindergarten students, 13.5% were permanent or temporary residents of Switzerland (not citizens) and 14.6% have a different mother language than the classroom language. The municipality had 21 primary classes and 427 students. Of the primary students, 11.2% were permanent or temporary residents of Switzerland (not citizens) and 15.7% have a different mother language than the classroom language. There were also 12 students who attended a special, smaller primary class. There were 305 students who attended 16 advanced, pre-Gymnasium classes. During the same year, there were 16 lower secondary classes with a total of 269 students. A total of 189 or 70.3% of the students are in the highest two levels (which generally lead to a University education), while 70 or 26.0% of the students are in the third level (which may lead to a Fachhochschule education or apprenticeship) and 10 or 3.7% of the students are in the lowest level (which may lead to an apprenticeship).
Willisau is home to the Regionalbibliothek Willisau library. The library has (as of 2008) 10,898 books or other media, and loaned out 28,107 items in the same year. It was open a total of 146 days with average of 10 hours per week during that year.