Old English dweorh, dweorg (West Saxon), duerg (Mercian), "very short human being, person much below ordinary stature, whether of proportionate parts or not," also "supernatural being of subhuman size," from Proto-Germanic *dweraz (source also of Old Frisian dwerch, Old Saxon dwerg, Old High German twerg, German Zwerg, Old Norse dvergr), perhaps from PIE *dhwergwhos "something tiny," but with no established cognates outside Germanic.
Also used by c. 1200 of an animal or plant much below the ordinary size of its species." The use of dwarf in the Germanic mythological sense, "a diminished and generally deformed being, dwelling in rocks and hills and skilled in working metals," seems to have faded after Middle English and been revived after c. 1770 from German.
Whilst in this and other ways the dwarfs do at times have dealings with mankind, yet on the whole they seem to shrink from man; they give the impression of a downtrodden afflicted race, which is on the point of abandoning its ancient home to new and more powerful invaders. There is stamped on their character something shy and something heathenish, which estranges them from intercourse with christians. They chafe at human faithlessness, which no doubt would primarily mean the apostacy from heathenism. In the poems of the Mid. Ages, Laurin is expressly set before us as a heathen. It goes sorely against the dwarfs to see churches built, bell-ringing ... disturbs their ancient privacy; they also hate the clearing of forests, agriculture, new fangled pounding-machinery for ore. ["Teutonic Mythology," Jakob Grimm, transl. Stallybrass, 1883]
The shift of the Old English guttural at the end of the word to modern -f is typical (compare enough, draft) and begins to appear early 14c. In Middle English it also was dwerþ, dwerke. Old English plural dweorgas became Middle English dwarrows, later leveled down to dwarfs. The use of dwarves for the legendary race was popularized by J.R.R. Tolkien. As an adjective, from 1590s.
The use of giant and dwarf in reference to stars of the highest and lowest luminosity is attested by 1914, said to have been suggested by Danish astronomer Ejnar Hertzsprung, (1873-1967); hence red dwarf (attested by 1922), white dwarf, black dwarf "dead and lightless star" (1966).