The building was commissioned from Giacomo Quarenghi by the Society for Education of Noble Maidens and constructed in 1806-08 to house the Smolny Institute for Noble Maidens, established at the urging of Ivan Betskoy and in accordance with a decree of Catherine II (the Great) in 1764, borrowing its name from the nearby Smolny Convent. The Smolny was Russia's first educational establishment for women and continued to function under the personal patronage of the Russian Empress until just before the 1917 revolution. A nice garden and iron-work grille around the institute date from the early 19th century.
In 1917, the building was chosen by Vladimir Lenin as Bolshevik headquarters during the October Revolution. It was Lenin's residence for several months, until the national government was moved to the Moscow Kremlin. After that, the Smolny became the headquarters of the local Communist Party apparat, effectively the city hall. In 1927, a monument to Lenin was erected in front of the building, designed by the sculptor Vasily Kozlov and the architects Vladimir Shchuko and Vladimir Gelfreikh.
This was the site of Sergei Kirov's assassination in 1934. After 1991, the Smolny was used as the seat of the city mayor (governor after 1996) and city administration. Vladimir Putin worked there from 1991 to 1997 in the administration of Anatoly Sobchak.
The name "Smolny" derives from the location, in the early days of St. Petersburg the place at the edge of the city where pitch ("smola" in Russian) was processed for use in shipbuilding and maintenance. As a result the locale was called "smolny" - the place of pitch.
The Smolny Institute for Noble Girls is featured in Masha and The Youngest Lady in Waiting, two novels by Mara Kay.