Wicked dwarves

The wicked dwarves were the few dwarves who fought (or rumored to have fought) on the side of Morgoth and later Sauron, or in alliances with orcs and goblins during the first three ages of the world. There may have been some from every dwarven house except that of Durin.

Background
Of the races, Dwarves are the most resistant to corruption and influence of Morgoth and later Sauron. The seven rings of Power of the dwarves did not turn them to evil, but it did amplify their greed and lust for gold. It is said that very few willfully served the side of darkness. Of those who did very little was written. It is suggested by Tolkien in some of his notes that of the dwarves that turned to wickedness (in first and later ages) they most likely came from the eastern kindreds of the Dwarves of the far eastern mansions (and perhaps some of the nearer ones). The may have come under the Shadow of Morgoth and turned to evil, in a similar way as the eastern Men did later. It is however unclear if these refer to Dwarves beyond Iron Hills (the most eastern known stronghold of the Dwarves) Of the seven houses few fought on either side during The Last Alliance at the end of the Second Age, and is known that none from the House of Durin ever fought on the side of evil. During the early parts of the Third Age (or at least in legends of the previous), it is known that in some places wicked dwarves had made alliances with the goblins and orcs. Because Dwarves are not evil by nature, few ever served the Enemy of their own free will (though rumors of Men suggest the total was greater). While a few of the dwarves from the East may have served the Enemy during the War of the Ring, the hobbits of the shire encountered an unusual number of strange dwarves from the east who were trying to flee West from Mordor's influence (as was also noted in Bree).

Some of the dwarves accused of fighting on the side of darkness may have been in conflict due to enmity between the races due to misunderstandings. This may apply to the Petty-dwarves who became distrustful and had great hatred of the elves because most of their kind was wiped out, and also between them and other dwarves since they had been exiled by the other clans. Nor did they tend to get along with the humans either.

In some cases there was enmity between the races caused by the greed and envy; men lusting after the dwarves' wealth and their handiwork, and possibly between the Dwarven clans themselves. In one story,  Fram is said to have sent the teeth of Scatha to the dwarves, after the requested their treasures be returned. It is said that they saw this as a great insult and killed Fram causing loss of love between dwarves and Rohan. Many of the dwarves had become nomadic merchants and smiths without a home wandering and tresspassing through foreign and private lands (which may have been viewed with suspicion in some places).

Still others became estranged from each other for other reasons; the rise of the enmity and distrust between dwarves and elves after the fall of Khazad-dum, for example. What may have been fought in self-defense may be seen as an evil action by the opposing force (for example distrust of the wood-elves of Mirkwood and Thorin's party). But in these cases those involved were never allied with the Enemy or his ambassadors (though the wars between the Free Peoples may have worked to his advantage). The trust and interaction between elves and dwarves was later restored through the friendship of Legolas and Gimli.

Behind the scenes
In some of Tolkien's earliest writings Dwarves were a mostly evil race created by Melko/Melkor, as seen in the The Book of Lost Tales. But this idea was revised in later writings. A few of these ideas were reused in the history of the Petty-dwarves. Although they were not evil, but misunderstood tragic individuals hunted by those who thought them monsters or stupid creatures.]

In earlier versions of the Silmarillion as detailed in The History of Middle-earth series, Mîm, a Petty-dwarf was a much more evil character, who actively betrayed Túrin. But as dwarves gradually changed in Tolkien's writings from evil orc-like beings to the dwarves they later became, Mîm's character was changed, and in the final texts he is no longer a true villain, but almost a tragic character in his own right.