The Mines of Moria were originally constructed and inhabited by the Dwarves led by Durin. After thousands years of prosperity, the dwarfs awoke a balrog, leading to their abandonment. Orcs later occupied them, and the Fellowship passed through in Moria.