Khazad-dûm was grandest and most famous of the mansions of the Dwarves. It lay in the central parts of the Misty Mountains, tunnelled and carved through the living rock of the mountains themselves, so that a traveller could pass through it from the west of the range to the east. It was founded in very ancient days by Durin the Deathless, who came upon a shimmering lake beneath the mountain Celebdil, with a crown of stars reflected in its waters. He named that lake in the Dwarvish tongue, Kheled-zâram, the Mirrormere, and there he started the building of Khazad-dûm.
As the millennia passed, the descendants of Durin sat upon the throne of Khazad-dûm, and their cavernous city became famous throughout the world. It even has a passing mention in Quenta Silmarillion, the tale of the Elf-lords and their wars far to the west, though to them it was no more than a distant rumour they heard from the Dwarves of the Blue Mountains on their borders. In the Second Age, Noldor out of Lindon founded a country of their own by the western gates of Khazad-dûm. A rare friendship sprang up between the Dwarves and the Elves of this new land, Eregion. Eregion's ruler, Celebrimbor, helped to construct the famous and magical gate that became known as the West-gate of Moria, and indeed went so far as to present King Durin III with a Ring of Power. The friendship of Khazad-dûm and Eregion came to a sudden end, though, in II 1697, when Sauron overran the country of the Elves, and the doors of Khazad-dûm were sealed against his forces.
Eventually, Sauron was driven back and Khazad-dûm continued to thrive. Much of its great wealth was based on the Mithril that was found in its mines, and as the centuries passed, the Dwarves mined deeper and deeper for the precious metal. In the year III 1980, they dug too deep, and unleashed a nameless terror from the depths beneath the city. The creature wreaked dreadful destruction, and in slaying the then King, Durin VI, became known as Durin's Bane. In the following year, Durin's son, Náin I, was also lost, and the Dwarves fled their ancient home. After millennia as one of the richest cities in Middle-earth, Khazad-dûm stood dark and empty, but for the brooding menace the Dwarves had released. In that time it was given a new name, Moria, the Black Pit.
The monster of Moria - a Balrog of Morgoth, as was later known - lurked alone in Moria for nearly five hundred years. After that time, the old city of Khazad-dûm began to be peopled again, but not by Dwarves. Sauron directed his creatures there, and it began to fill with orcs and trolls. Though the orcs' numbers were greatly reduced in the Battle of Nanduhirion, fought in the valley beneath Moria's East-gate in III 2799, the Balrog could not be bested, and Khazad-dûm remained a citadel of darkness.
There were two attempts by the Dwarves of Durin's line to reclaim their ancient home. The first of these was by Balin, who led a force of Dwarves there from Erebor in III 2989, but though he was successful at first, he was eventually defeated and slain. The story of the second attempt to recolonise the Dwarf-mansions is less clear, but it seems that after several centuries, Durin VII became King of Durin's Folk, and led a further return to the citadel. It seems he was successful, so that long after the War of the Ring, the Dwarves of Durin's line reclaimed their inheritance, and the hammers rang again in their great halls beneath the Misty Mountains.
The Layout of Khazad-dûm
Khazad-dûm was a huge array of chambers, passages, mines, halls, stores and pits. In general, areas were either classed as mines or city. The mines were working sections of Khazad-dûm whilst the city was the area of habitation.
The city areas of Khazad-dûm were clustered mainly to the east; these were the oldest parts of the kingdom and had good access to the East-gate. They were structured into seven Levels and seven Deeps. The Levels stretched above the gate whilst the Deeps were set deeper within the mountain below the level of the East-gate. It is possible that the First Level (on which the East-gate was set) and the First Deep were highly intertwined.
The eastern section of the city spaces had also been dolven in such a manner as to have light shafts to illuminate their chambers. One example of this is the Chamber of Mazarbul which was located on the eastern edge of the Seventh Level.
The mine areas of Khazad-dûm were interlaced with the city spaces, but spread also westward toward the Western-gate. The mines ran deeper and further than any other tunnels within Khazad-dûm, and it is possible that more of the lower Deeps were given over to mining, although this is only conjecture.
The defined change between mines and city can be seen when the Fellowship pass through Moria - there is a marked difference between the early passages and chambers and those of the city structures illuminated by Gandalf.