Hedgehogs are legal to keep as pets in Canada, the UK and most US states, although it should be noted that this means buying a hedgehog from a reputable breeder rather than just taking a hedgehog from the wild.
However, there are some US states that make it illegal to own a hedgehog as a pet or put restrictions on their ownership. This page explains which states have restrictions and where you can safely keep a pet hedgehog.
This information comes from Wikipedia, and may be updated or changed at any time, so you should still check carefully that it is legal to own a hedgehog in your state.
It is completely legal to keep a hedgehog in the following US states:
Alabama
Alaska
Arizona
Arkansas
Colorado
Connecticut
Delaware
Florida
Idaho
Illinois
Indiana
Iowa
Kansas
Kentucky
Louisiana
Maine
Maryland
Massachusetts
Michigan
Minnesota
Mississippi
Missouri
Montana
North Carolina
North Dakota
Nevada
New Hampshire
New Jersey
New Mexico
New York (not New York City)
Ohio
Oklahoma
Oregon
Pennsylvania
Rhode Island
South Carolina
South Dakota
Tennessee
Texas
Utah
Vermont
Virginia
Washington
West Virginia (not Fairfax County)
Wisconsin
Wyoming
California
Georgia
Hawaii
Nebraska
New York City, New York
Fairfax County, West Virginia