The various species of hedgehog live in temperate woodlands and grasslands across Europe, Africa and Asia. They are also found in New Zealand as an invasive species.

The New Zealand hedgehogs were deliberately imported by British colonists, as the animals are native to the island of Great Britain. Originally, they were brought to New Zealand's South Island out of nostalgia, but later they were used as pest control. They are now considered a pest themselves as they compete with native insectivores and devour many native invertebrates and small reptiles. These imported British hedgehogs are Erinaceus europaeus, or the European hedgehog. The native range of these creatures spans England eastward into the Mediterranean and north to Scandinavia. They prefer low shrubby grasslands and avoid marshes and pine forests. In populated areas, these hedgehogs can be found roaming gardens, lawns and even garbage dumps.

Hedgehogs also inhabit the arid habitats of East Africa. The four-toed hedgehog, Atelerix albiventris, lives in areas with well-drained soil, including parts of suburban Nairobi. The hedgehog sold in the pet trade in North America is an African hybrid called the African pygmy hedgehog. It is a cross between the Algerian and the white-bellied hedgehog. The white-bellied is a savanna species, while the Algerian lives in the Mediterranean, North Africa and Spain. Hedgehogs overall tend to be generalists who will eat anything small enough to serve as prey.

The animal trade provides the opportunity for hedgehogs to be transported to countries outside of Asia, Africa and Europe. Hedgehogs do not live in the wild in non-native countries, but they can be seen in pet stores, zoos, animal habitats and in private homes as pets.

Hedgehogs hibernate in cold regions and sleep through periods of drought or heat in the desert. In nice climates, the hedgehog stays active year-round. This mammal survives off insects, worms, mice and frogs, making it an ideal pet for a garden. The hedgehog will create a home base but will not fight to protect itself should a larger animal want to take over.