There is little evidence of permanent settlement in Lohja before the pre-Roman era. Although rudimentary farming was practiced, it likely did not tie people to one place. The oldest permanent settlement took root in Lohja at the end of the 12th century, when Christian burial practices began replacing pagan ones. Parish records are often considered a sign of an organized society, and Lohja’s founding year is generally recognized as 1382. This is the year of the earliest known document mentioning Lohja’s rectory and St. Lawrence’s Church.
By the 16th century, Lohja's population had grown to around 2,000 people, marking it as a densely populated area for its time. However, the Swedish Empire's expansion brought increased taxation, military conscription, and additional burdens such as mandatory transport services and road maintenance. Lohja gradually evolved into an estate-based society, with the nobility, particularly the Kirkniemi estate owners, dominating. The end of the Swedish Empire saw widespread famine, high mortality rates, and Russian invasions, which also affected Lohja.
By the 19th century, Lohja was one of Finland's most densely populated regions, although it experienced slow growth. There were no significant urban centers, and agriculture remained the primary livelihood. The tenant farming system became more prevalent, with one-quarter of the population being landowning farmers and two-thirds tenant farmers or landless laborers. Nobility, artisans, and other professions made up less than 10% of the population.
Industrialization in Lohja began in the latter half of the 19th century with the development of the sawmill industry. Lohja’s advantages included Lake Lohjanjärvi and the completion of the Hanko railway in the 1870s, which provided efficient transportation for timber. Sawmills, especially in Virkkala, became a focal point of industry. Major industrial growth followed at the turn of the century: Lohja Lime Factory was established in Virkkala in 1897, the Lohja Cellulose Factory in Lohjankylä in 1906, and Ab Faner Oy in 1916. Cooperative businesses also significantly contributed to the region’s prosperity and development.
Both Virkkala and Lohjankylä were proposed as semi-independent communities, but only Lohjankylä became an organized settlement, Lohjannummi, in 1911. In 1926, it was elevated to a market town, leading to the division of Lohja into two parts: the town of Lohja and the surrounding rural municipality. The status of the market town was further solidified by the completion of a railway line in 1928 connecting Lohja Station to the town’s industrial area. Meanwhile, Virkkala and areas around Lohja Station and Routio emerged as urbanizing centers.
Reunification of Lohja was seen as inevitable for decades but only materialized in 1997. In subsequent years, Sammatti was incorporated in 2009, followed by Karjalohja and Nummi-Pusula in 2013. Today, Lohja is one of the largest municipalities in Uusimaa, distinguished by its bilingual character, unique natural beauty, vibrant cultural offerings, and excellent quality of life for both residents and visitors.