Although the Dwarves in Moria died long before The Lord of the Rings: The Fellowship of the Ring, Gimli somehow did not know and actively encouraged the Fellowship to travel through the mines of Moria. 30 years before the beginning of The Lord of the Rings: The Fellowship of the Ring, Balin, one of the dwarves who accompanied Thorin Oakenshield in The Hobbit and Gimli’s cousin, led a mission to reclaim the abandoned Dwarf kingdom of Moria. There, the Dwarves hoped to reestablish their kingdom and even recover a lost Dwarf Ring of Power. While the colony was initially successful, Orcs and Durin’s Bane, the Balrog, attacked them five years later, killing all of the Dwarves.
However, Gimli did not know about the Dwarves’ fate in The Lord of the Rings: The Fellowship of the Ring. Excited to see Balin, Gimli was horrified when the Fellowship entered Moria and found only bones. As they were forced to continue traveling through the caves, the Fellowship of the Ring eventually found Balin’s tomb and the Book of Mazarbul, which recounted the Dwarves’ experiences in Moria and ultimate defeat by the army of Orcs. Soon after, the Fellowship had to fight not only the Orcs, but a Cave-troll and the Balrog, resulting in Gandalf’s death.
Related: Why Gimli Didn't Return For The Hobbit (And Where He Was)
This disastrous outcome raises the question of how Gimli did not know about the Dwarves’ failure to hold Moria. Since Balin and his company had not contacted anyone for 25 years, it seems like Gimli should have been more suspicious of entering the underground kingdom. According to one theory (via Stack Exchange), Gimli did not know about the fall of Moria in The Lord of the Rings: The Fellowship of the Ring movie due, effectively, to
Read more on screenrant.com