Mellingen is first mentioned in 1045 as Mellingen though this comes from a 16th-century copy of the original. Around 1217–39 it was mentioned as Menelingen.
Mellingen has an area, as of 2006, of 4.8 km2 (1.9 sq mi). Of this area, 36.2% is used for agricultural purposes, while 32.4% is forested. Of the rest of the land, 26.7% is settled (buildings or roads) and the remainder (4.8%) is non-productive (rivers or lakes).
The municipality is located in the Baden district. The compact, walled medieval city center straddles the river Reuss. The old city is surrounded by a number of newer settlements. It has grown into a center of the small Unteres Reusstal region.
The blazon of the municipal coat of arms is Or a Lion rampant Gules and in chief of the last a Bar[rulet] Argent.
Mellingen has a population (as of 31 December 2016) of 5,369. As of 2008, 29.6% of the population was made up of foreign nationals. Over the last 10 years the population has grown at a rate of 10.1%. Most of the population (as of 2000) speaks German (83.0%), with Italian being second most common ( 4.9%) and Albanian being third ( 2.6%).
The age distribution, as of 2008, in Mellingen is; 475 children or 10.4% of the population are between 0 and 9 years old and 552 teenagers or 12.1% are between 10 and 19. Of the adult population, 680 people or 14.9% of the population are between 20 and 29 years old. 681 people or 14.9% are between 30 and 39, 751 people or 16.4% are between 40 and 49, and 626 people or 13.7% are between 50 and 59. The senior population distribution is 489 people or 10.7% of the population are between 60 and 69 years old, 205 people or 4.5% are between 70 and 79, there are 90 people or 2.0% who are between 80 and 89, and there are 19 people or 0.4% who are 90 and older.
As of 2000, there were 179 homes with 1 or 2 persons in the household, 876 homes with 3 or 4 persons in the household, and 574 homes with 5 or more persons in the household. The average number of people per household was 2.50 individuals. In 2008 there were 562 single family homes (or 28.1% of the total) out of a total of 2,002 homes and apartments.
In the 2007 federal election the most popular party was the SVP which received 37.5% of the vote. The next three most popular parties were the FDP (18.7%), the CVP (16.3%) and the SP (13.6%).
In Mellingen about 68.8% of the population (between age 25-64) have completed either non-mandatory upper secondary education or additional higher education (either university or a Fachhochschule). Of the school age population (in the 2008/2009 school year), there are 320 students attending primary school, there are 211 students attending secondary school, there are 290 students attending tertiary or university level schooling in the municipality.
The historical population is given in the following table:
The city walls are listed as a Swiss heritage site of national significance.
As of 2007, Mellingen had an unemployment rate of 2.9%. As of 2005, there were 41 people employed in the primary economic sector and about 10 businesses involved in this sector. 497 people are employed in the secondary sector and there are 60 businesses in this sector. 956 people are employed in the tertiary sector, with 174 businesses in this sector.
As of 2000 there were 2,373 total workers who lived in the municipality. Of these, 1,769 or about 74.5% of the residents worked outside Mellingen while 896 people commuted into the municipality for work. There were a total of 1,500 jobs (of at least 6 hours per week) in the municipality.
From the 2000 census, 1,961 or 46.3% are Roman Catholic, while 1,175 or 27.7% belonged to the Swiss Reformed Church. Of the rest of the population, there are 2 individuals (or about 0.05% of the population) who belong to the Christian Catholic faith.
Mellingen Heitersberg railway station is a stop of the S-Bahn Zürich on the line S3.