The Hedgehog is one of the European members of the porcupine family.
Or rather, it is the English name of that member, as its French name is herisson, which might be translated “bristler,” and its German name is Igel.
But despite the hog part of the name, neither it nor the porcupine is remotely related to the porcine or swine species of the animal kingdom; hog refers merely to the swinelike appearance of the snout.
And in England it makes its home chiefly among the hedgerows bordering the roadsides; hence the name.
As for the porcupine, its name seems to be a highly corrupted form of the Latin porcus spinosus, “thorny pig.”