The "hob" in hobgoblin is a person's name. It is a familiar form of Robin or Robert, the way people once said Hob for Rob.

Wordorigins traces the nickname to a fourteenth-century manuscript, British Library Harley 2253, which uses it in a poem mocking Robert the Bruce. In the late fifteenth century, Robin, Robert and Hob became linked with elves and household sprites. The best known is Robin Goodfellow, whom Shakespeare turned into Puck in A Midsummer Night's Dream.

Wikipedia describes Hob as a friendly name for the countryside goblin. Anatoly Liberman, on the Oxford University Press blog, adds that Robert was also a common name for the devil. He also notes that the rhyme of hob with gob gives the compound "a particularly good ring."

The second half has a murkier past. Goblin came from French gobelin, which Wordorigins says is attested once in the twelfth century and becomes common only in the sixteenth. Liberman traces it to Medieval Latin Gobelinus, a demon that the chronicler Orderic Vitalis described being driven out of a temple in Normandy.

Before that, the trail goes cold. An old theory linked goblin to Greek kobalos, an impudent rogue, and Wordorigins still favors that route. Liberman sees little advantage in it. Others have compared German Kobold, a house spirit or mine gnome, whose own origin is unclear. Liberman thinks English probably took the word from northern French, but how French got it is still unknown.

English had goblin by the early fourteenth century. The compound came later. Wordorigins finds the first known "Hobgoblyng" in John Palsgrave's 1530 French grammar, glossed with French gobelin. By 1567 Thomas Drant was grouping hobgoblins with witches among old wives' tales.

A hobgoblin was a nuisance more than a monster, and the word drifted toward imagined fears. John Bunyan paired "hobgoblin" with "foul fiend" in a hymn of 1684. Ralph Waldo Emerson gave it its most quoted line in his essay Self-Reliance: "A foolish consistency is the hobgoblin of little minds."