MOST OF THE HISTORY OF THE DWARVES
We start with a skewed history of the Dwarves, and we know it’s skewed because right off the bat Tolkien warns us that “strange tales” are told of them, but “since these things lie far back beyond our days little is said of them here.” The first Dwarf was Durin, who became the king of the first of the seven nations of the Dwarves, the Longbeards (which is also the nation of Thorin and his kin, according to the Hobbit).
Once upon a time Durin came to Moria, and built a great city of Dwarves there, and ruled for many years, becoming known as Durin the Deathless because he didn’t die of old age for an absurdly long time. What’s more, five times since the beginning of history a prince of the Dwarves was born so alike to Durin the Deathless in appearance and attitude that this baby Dwarf was named Durin, and according to the beliefs of the Dwarves was Durin reincarnated. Because Dwarves, unlike the various other races, totes believed in reincarnation.
At the end of the War of Wrath that closed out the First Age, when a big chunk of Middle-Earth got sunk, Moria was the richest and most powerful city in the world for a while in the early Second Age. Eventually Moria was besieged by Sauron and his forces, but the city never fell, they just closed their big gates and waited ‘em out. In this manner the Dwarves endured the entire Second Age and the first half of the Third Age.
Then came the balrog. It was the Dwarves’ own fault, of course; they were mining mithril from the bottom of the world and chased the veins down and down and finally they found the lair of one of Morgoth’s lieutenants, a creature that had slept since the First Age. The balrog, once roused, started killing Dwarves and didn’t stop until the king at the time (Durin VI) and most of his subjects were slain. Durin VI’s son and heir, Nain I, emigrated with a group of followers across Mirkwood to Mount Erebor, the Lonely Mountain, where he built a new kingdom.
Confusingly, Nain I’s grandson Thorin I abandoned Erebor and went up into the Gray Mountains to the north, where other Dwarves lived, and allied with them and started to expand their holdings, but Thorin I’s son Dain I was slain by a dragon and and Dain I’s two sons Gror and Thror left the Gray Mountains and went in two groups to the Iron Hills east of Erebor, and Erebor itself.
So Thror returned to Erebor, which was either abandoned entirely and then repopulated, or else a small colony of Dwarves had eked out in the abscence of their king. In either case, the Kingdom Under the Mountain was reinvigorated by Thror, and they started trading with the Men of the area, and it was all good times.
Good times brought the dragon; Smaug the Golden flew down from the Gray Mountains, sacked the human settlement of Dale and killed a bunch of Dwarves as they fled. Thror, Thror’s son Thrain II, and Thrain II’s kids (including Thorin II, main character of the Hobbit), survived and took up aimless wandering.
So far so good, right? But then the story starts to get crazy.