The Petty-dwarves were created from remnant ideas based on the Nauglath in Tolkien's earliest writings in the The Book of Lost Tales. They were more or less created to explain the difference between the Dwarves later writings such as The Hobbit in comparison to the Wicked dwarves from his earlier stories which he hadn't yet completely abandoned. However, some of the ideas of the Nauglath were reincorporated into the Naugrim (Dwarves) by J.R.R. Tolkien or his son in the published Silmarillion and separate from the Petty-dwarves (such as the history of Belegost and Nogrod, and the Sack of Doriath events).
Niwennog was their first ascribed name (preceding the change to Nibin-noeg), as told of in the index of The War of the Jewels.