The Lego City theme traces its origins to Lego Town, a theme introduced with the first minifigures in 1978, when a completely new range of buildings and vehicles were introduced for the European markets, although Lego sets with city buildings and vehicles had been commonplace since the late 1960s.

In 1975, a precursor to the minifigure was introduced, in the same scale but without moving parts. Through the mid-1970s Town sets had buildings and vehicles functioning more as models, with minifigures unable to ride the vehicles, which continued with the new minifigures. In 1980, the Trains theme was completely revamped to complement the Town sets. By 1983, the remaining vehicle based sets that were not minifigure compatible had been discontinued.

All sets were originally released under the "Legoland" label until it was discontinued and replaced with "Lego System" branding in 1991. Eventually, different subthemes under the "Town" brand were used to tie together related sets, such as police, coast guard, emergency services, airport, road rescue, trains, fire, and harbour. During the Christmas season, a City-themed advent calendar set is sold through the online Lego Shop and at retailers.

On June 22, 2019, Lego City Adventures aired on Nickelodeon during a Saturday morning lineup along with SpongeBob SquarePants.

In June 2020, following the murder of George Floyd by police, Lego made an announcement that they would temporarily stop marketing police-related Lego City sets. Due to misinformation claiming that they removed these sets from being sold that led to backlash, Lego issued a follow-up statement emphasizing that the sets were still for sale and that digital advertising for the sets would just be temporarily haulted.

In January 2021, Lego released a new plate-based road system for the City theme that differed from its predecessor, which used baseplates whose height equaled one-half of plate. However, this system was critizised by some members of the Lego community due to its alleged incompatibility with the former baseplates, which had been gradually reduced in usage and limited to sets such as Lego Modular Buildings.

The Lego Group began in the workshop of Ole Kirk Christiansen (1891 - 1958), a carpenter from Billund, Denmark, who began making wooden toys in 1932. In 1934, his company came to be called "Lego", derived from the Danish phrase leg godt, which means "play well". In 1947, Lego expanded to begin producing plastic toys. In 1949 Lego began producing, among other new products, an early version of the now familiar interlocking bricks, calling them "Automatic Binding Bricks". These bricks were based on the Kiddicraft Self-Locking Bricks, which had been patented in the United Kingdom in 1939 and released in 1947. Lego had received a sample of the Kiddicraft bricks from the supplier of an injection-molding machine that it purchased. The bricks, originally manufactured from cellulose acetate, were a development of the traditional stackable wooden blocks of the time.

The Lego Group's motto, "only the best is good enough" (Danish: det bedste er ikke for godt, literally "the best isn't excessively good") was created in 1936. This motto, which is still used today, was created by Christiansen to encourage his employees never to skimp on quality, a value he believed in strongly. By 1951 plastic toys accounted for half of the Lego company's output, even though the Danish trade magazine Legetøjs-Tidende ("Toy Times"), visiting the Lego factory in Billund in the early 1950s, felt that plastic would never be able to replace traditional wooden toys. Although a common sentiment, Lego toys seem to have become a significant exception to the dislike of plastic in children's toys, due in part to the high standards set by Ole Kirk.

By 1954, Christiansen's son, Godtfred, had become the junior managing director of the Lego Group. It was his conversation with an overseas buyer that led to the idea of a toy system. Godtfred saw the immense potential in Lego bricks to become a system for creative play, but the bricks still had some problems from a technical standpoint: their locking ability was limited and they were not versatile. In 1958, the modern brick design was developed; it took five years to find the right material for it, ABS (acrylonitrile butadiene styrene) polymer.] A patent application for the modern Lego brick design was filed in Denmark on 28 January 1958, and in various other countries in the subsequent few years.

Lego building at NASA's Kennedy Space Center The Lego Group's Duplo product line was introduced in 1969 and is a range of simple blocks whose lengths measure twice the width, height, and depth of standard Lego blocks and are aimed towards younger children.

In 1978, Lego produced the first minifigures, which have since become a staple in most sets.

In May 2011, Space Shuttle Endeavour mission STS-134 brought 13 Lego kits to the International Space Station, where astronauts built models to see how they would react in microgravity, as a part of the Lego Bricks in Space program.

In May 2013, the largest model ever created was displayed in New York City and was made of over 5 million bricks; a 1:1 scale model of an X-wing fighter.[ Other records include a 34-metre (112 ft) tower and a 4 km (2.5 mi) railway.

In February 2015, Lego replaced Ferrari as the "world's most powerful brand." They were at position 378 of Brand Finances global brand ranking.

The original theme called Creator was launched in 2001 and had over-sized minifigures, such as mascots Tina and Max, targeting a younger demographic but was discontinued after one year. In 2002, the Creator name was used for sets composed of buckets or tubs of generic Lego bricks, which later became "Make and Create" and then "Bricks and More".

In 2003, a theme called "Designer" began have subject specific sets with bricks and instructions included to build multiple models based around a concept, such as vehicles or animals. In 2006, Lego then began branding its Designer sets under the "Creator" theme.

In 2004, a subtheme called X-Pods had similar smaller builds included in travel-sized containers and was also then branded under the Creator theme in 2006. The 2006 X-Pods were also the first Creator theme to use the "3-in-1" labeling on the packaging, which later became a primary feature of Creator sets.

In 2007, the Creator line introduced two sets based around creating mosaics under a separate sub-theme. The theme began including Lego minifigures in sets based around buildings in 2011.

Lego Ninjago is a Lego theme that was introduced in 2011, which is a flagship brand of The Lego Group. It is the first to be based on ninja since the discontinuation of the Lego Ninja theme in 2000. Whilst it retains some elements of the previous theme, it is based on a more detailed storyline set within a fantasy world, primarily underpinned by the computer-animated television series that it is based on, Ninjago.

The theme focuses on a group of six teenage ninja, led by the legendary Green Ninja, Lloyd Garmadon. The main ninja characters are defined in the story as "Elemental Masters", which means that they each possess elemental powers. The ninja are trained in the fictional martial art of "Spinjitzu" by their ancient and wise teacher, Master Wu, giving them the ability to fight against the forces of evil.

The theme enjoyed phenomenal popularity and success in its first year, and a further two years were commissioned before a planned discontinuation in 2013. However, after a brief hiatus, the line was continued after feedback from fans and has been in production ever since. The Lego Group developed the theme into a media franchise aimed primarily at young boys and teenage boys, which has produced books, video games and theme park attractions. The popularity of the TV series and the toy line resulted in the production of The Lego Ninjago Movie, released in 2017, which was the third film in The Lego Movie franchise. In January 2021, the Ninjago theme celebrated its ten-year anniversary, having maintained its popularity for more than a decade, making it one of The Lego Group's longest running and most successful original brands.

The Lego Star Wars designers have revealed how they've 'changed strategy' to get popular minifigures into cheaper and more accessible sets. Lego Star Wars Creative Lead Jens Kronvold Frederiksen explained, "We have changed our strategy a little bit over the years," and continued, "Where in the past, we often kept some of them - the most important especially - for the higher prices, we are now thinking young kids, maybe newcomers to Star Wars, want to get into it.

The Lego Star Wars designers revealed the Force Ghost minifigures as a result of changes to the company's transparent plastic. Creative Lead Jens Kronvold Frederiksen, "The reason for not doing it was that the minifigures are made out of many different types of plastic, because they need to have different abilities and characteristics," Design Director Michael Lee Stockwell explained, "Some have to be flexible, some need to use clutch power and whatnot," and continued, "So the hands are different material than the heads, for example."