Khazad-dum

Moria also known as Khazad-Dum or Dwarrowdelf was the first major realm established by the Dwarves of Durin's Folk during The First Age, under the reign of Durin I, the Deathless. It was a cavernous realm set under the mountains of Caradhras, Celebdil and Fanuidhol in the Misty Mountains, and where the Dwarves mined for Mithril.
== Background ==
Moria was established by Durin I "Deathless" when he found the Dimril Dale. It prospered on its Mithril Mines and known to have traded with Eregion, Lorien, Belegost in the Blue Mountains, Gondolin and Nargothrond. Durin became King of Durin's Folk and overlord of the other six Dwarf Kingdoms, and established the Line of Durin. Some of his descendants who bore a particular resemblance to him where named Durin. The third of these, Durin III of Moria, was personally given the first of the seven Dwarven Rings of Power.
The Dwarves of Moria prospered, and their impregnable gates allowed them to withstand the sack of nearby Eregion by Sauron in the Second Age, and the coming of the Orcs from the North during the time of Angmar, in which they infested the Misty Mountains in places like Gundabad and Goblin-town.
The Dwarves, however, delved too greedily and too deep, and in TA 1980 awoke The Balrog, who slain their kings Durin VI and Nain I, causing the Dwarves to flee in 1981 and establish the Kingdom of Erebor.
After Erebor was itself lost to Smaug, its king Thrór tried to reclaim Moria in TA 2799 only to find it overrun with Orcs. He was killed by their chief, Azog, but his grandson Thorin Oakenshield led the Dwarves to victory over the Orcs. However, their loses were too heavy to retake Moria.
Azog lived still, and Orcs multiplied in Moria, making an alliance with Sauron in Dol Guldur. In TA 2941, they assembled in Dol Guldur and formed its army, which Azog led against the Dwarves, Men and Elves in The Battle of the Five Armies.
== Balin's Expedition ==
After they were routed, Moria was considred cleared of Orcs and Balin later took an expedition including Ori and Oin to recover it. Their mission at first seemed successful, and Balin went so far as to claim the title Lord of Moria, settling in the 21st Hall.
This all changed in their fifth year there. On November 10th, the Orcs came up the Silverlode and killed Balin while he was alone, unaware and looking into Mirrormere. The Dwarves fought back but eventually lost East-gate and First Hall. The Orcs made it across the Bridge of Khazad-dûm and there was a battle in the Second Hall. Frár, Balin's son, fell there with his companions Lóni and Náli. The Orcs took all the lower levels as well as the Upper Halls to the Fifth Level.
The remaining Dwarves baricaded themselves in the Mazarbul or records chamber adjacent to the 21st Hall, where they were slowly running out of food. Oin took a party of Dwarves to look for the Hollin Gate as an escape, but he was taken by the Watcher in the Water and, after five days, only four members of his company returned alive to the chamber.
Eventually, the Orcs broke into the chamber and in the ensuing battle, Balin's colony had been sacked. While the Dwarves of Erebor were unaware of this, news of this did arrive at the Shire where Old Noakes spoke of Dwarves crossing the Shire telling stories of the Mountains teeming with Goblins.
== The Lord of the Rings: The Fellowship of the Ring ==
=== Quest of the Ring ===
In TA 3019, The Fellowship of the Ring are forced to go into Moria after the other members of the fellowship refused to endanger the hobbits' live However, Gandalf found that they could not enter the mines because the door the company found would not let them in until they solved the Riddle. It took Gandalf hours to figure out the password when Frodo Baggins realized the answer was "Friend" in Elvish. As the company entered the caves, the companions found the skeleton of a couple of Dwarves of Balin's colony. Boromir suggested they go for the gap of Rohan when they were suddenly attacked by the Watcher in the Waters. Though Legolas incapacitated it, the company was forced to retreat into the mountain. The watcher, blinded, destroyed the hidden door and rocks and boulders sealed the cave, trapping the company inside. Gandalf realized they had no choice but to enter the mines to get to the other side. However, though he tried leading his friends across, Gandalf found he could not remember the way.
During their time waiting for Gandalf to remember, Frodo noticed Gollum from below and informed Gandalf, who knew that the former hobbit had been following them since they left Rivendell. The two had a brief conversation, where Gandalf comforted Frodo that the Ring was given to him for a reason. At that moment, Gandalf noticed that there was no longer a foul stench in the air and remembered which way to go. 
As they passed through the Halls of Khazad-dûm, the group came across Balin's tomb, where they found the remaining members of the colony that Balin had attempted to build. Gandalf learned from the book written by Ori of how the colony fell when one of the Fellowship members, Peregrin Took accidentally knocked over one of the remains of a dwarf, along with a bucket and accidentally alerted the Orcs that lived in Moria of the Company's presence. 
=== Battle in Balin's Tomb ===
The Fellowship entered in a battle with the Orcs, where they were indeed successful. However, the company was forced to flee when more Orcs came. The company was soon surrounded by orcs until they were scared off by Durin's Bane, a Balrog that lived in the shadows.