The name “Heian-kyou” (平安京,  meaning “tranquility and peace capital”) was supposedly of popular origin, having the Emperor changed just the selected kanji; nevertheless most Japanese people in the following centuries didn’t  use that name and rather called it simly “Miyako” (京 or 都), which means “capital”, or “Kyou”, which is another reading of 京.  京 or 都, or sometimes 京師 were used in hstorical documents. “Kyoto” (京都) was eventually a combination of the two characters for “capital”, thereof the modern name.

There were several other Chinese-derived names used of the city. Among the most common were “Rakuyou”, abbreviated as “Raku”, a reading of the characters for Loyang, the name of the Eastern Capital of theT’ang dynasty as paired with the Western Capital at Ch’ang-an. Since the model for Heian was neither Loyang nor Ch’ang-an (as it has been erroneously argued), but
on the earlier Japanese capital at Fujiwara (which was inspired to Chien-k’ang), the use of the name might be surprising. But Japan had also known a period of dual capitals – this happened when in 809 Emperor Heizei after abdicating moved to Nara (aka Heizei-kyou) and started being known as “the Emperor of Nara”; although that period was over with the establishment of the capital at Nagaoka, the tradition was revived in terminology under the reign of Emperor Saga, when the literati started referring to the western half of the city (Ukyo) as Chdan (i.e., Ch’ang-an) and the eastern half as Rakuyo (Lo-yang). As the western half withered and failed and the eastern half became the heart of the capital, Rakuyo began to function as a name for the whole.

In the spring of 793, Emperor Kanmu was convinced by Wake no Kyomaro to abandon the delay-plagued construction of a capital at Nagaoka and asked Fujiwara no Oguromaro and Ki no Kosami to determine the auspices of a site for a new capital. The site was at Uta, the mausolea area for Kanmu’s imperial lineage in the upper end of what is now called the Kyoto basin.

At that time, most prominent inhabitants of the area were the Hata (members of a rich and powerful clan that claimed Chinese descent but seems to have come most immediately from Korea) and, in the souther part, the Haji. The presence of those clans may have been one of its chief attractions for Kammu and his advisers: Kammu himself was the maternal grandson of a Haji woman and Fujiwara no Tanetsugu and Oguromaro were intimately related with the Hata.

Following the advice of Wake no Kiyomaro, Kanmu himself had twice used the pretext of a hunting expedition to visit and inspect the Uta area and confirm his decision.

Oguromaro was appointed to supervise the construction of the new imperial palace and had to deal with several complex tasks, such as controlling the numerous streams that flowed though the area (a project in which he might have been helped by his Hata in-laws, with their wealth, experience, and engineering skills).

A 1696 Japanese woodblock map of Kyoto.

Although his palace was still in the early stages of construction, Kanmu moved to the new imperial seat in the late autumn of 794. Few weeks later, he issued an edict conferring on the capital city its official name and renaming (or, rather, selecting different Chinese characters for the name of) the province in which the site was located:

Enclosed collar-and-sash by mountains and streams, the province here makes a natural citadel. Because of that configuration, we devise a new designation for it: let this Postmontane [Yamashiro] Province be renamed the Province of the Mountain Citadel [Yamashiro]. Moreover, the joyfully
flocking people and the singers of praise raise their different voices in identical words, naming this the Capital of Peace and Tranquillity [Heian-kyou, 平安京].

The city covered an area measuring 4.5 km from East to West and 5.2 km from North to South, organized in a grid pattern. The Imperial Palace (Dairai) was placed in the centre Northern city limits; the Suzaku-oji had a width of 83m. At the souther end of it, the monumental gate called Rashōmon (羅城門) was built. The name of the gate can be written also as 羅生門 and this choice was popularized by a noh play of the same title, written by Kanze Nobumitsu (1435-1516). This gate inspired other artists: “Rashomon” is the title of a short novel by Ryunosuke Akutagawa first published in 1915 and of the renowned film of 1950 by Kurosawa, based on the novel by Akutagawa.

The area of the city was divided into 40 Jo (about 120m) square “Cho” (町) by major (oji) and minor streets (koji). There were two large markets, West Market (西市) and East Market (東市), facing the seventh street, Shichijō-ōji (七条大路). Tō-ji (東寺, “East Temple”) and Sai-ji (西寺, “West Temple”) were Buddhist temples built on the southern edge of the capital. An imperial garden called Shinsenen (ja:神泉苑) was adjacent to the Daidairi.

The capital outside the Greater Imperial Palace was divided into western and eastern halves, the line of demarcation being Suzaku Avenue. The western part of the city was swampy and dangerous, since it  overlapped the wetlands formed by the Katsura River, and even by the 9th century little progress had been made in developing the area. By the 10th century,he district had become so dilapidated that it began to be used as farmland, something which had previously been forbidden within the city limits.

With the exception of an area in the north of the Right Capital near to the palace, the residential areas which housed the aristocracy were all situated in the Left Capital, with the highest aristocracy such as the Fujiwara clan gathering in the northernmost part of the district.

Heian may rightly be called the first successful city in Japan, not only because it survived and prospered, unlike previous capitals, but also because it is there that we can see for the first time in Japanese history the distinctive characteristics of what urban life and civilization. It appears in several ways, but the most fundamental were the diversity of the population and the population’s removal from primary modes of production, with a variety of occupations and social differences that clearly distinguished the urban society from that of the countryside, where agriculture tended to monopolize the economy, and specialization of labor and social differentiation were limited.

Heian-kyou was the capital of Japan for over one thousand years, from 794 to 1868, with an interruption in 1180, when it was temporarily moved to Fukuhara-kyou (福原京).

A movement in favour of returning the capital to Heijou-kyou arose in 810 A.D. during a standoff over the emperor’s succession. However, Emperor Saga thought that keeping the capital in Heian would be best for the stability of the country and resisted this movement, naming Heian-kyou “Yorozuyo no Miya” (the eternal city.)

With the advent of the Kamakura and Edo Shogunate, Heian lost its importanceas a seat of power; however it kept its formal role as a capital until the Meiji restoration.