Marcos Chavez Gonzalez was charged with four counts of murder in the shooting late Sunday outside a TV store in Mount Airy, about 100 miles north of Charlotte, Mount Airy police said.
Police said Gonzalez was arrested without incident at a motel in Henry County, Va., about 50 miles northeast of the town.
Mount Airy, with a population of approximately 8,700, is the hometown of Andy Griffith and has built a tourist trade on nostalgia for the 1960s show that continues to thrive in syndication.
Authorities received information about his whereabouts around 2:30 a.m., according to a statement. Details haven't been released.
Gonzalez, 29, was being held in the Henry County jail, though it wasn't clear whether he had an attorney, jail workers said.
Mount Airy Police Chief Dale Watson said at a news conference Sunday that the victims were shot outside Woods TV, less than a mile from the police station. He said the victims and the suspect were at the store for a reason.
"We don't feel this was a random event," Watson said. "We do have an idea why (they were shot), but we won't be releasing that."
Alerts were issued in North Carolina and Virginia to be on the lookout for Gonzalez after the shootings.
State prison records show Gonzalez was released two years ago after serving more than four years on a 2002 conviction for kidnapping a minor.
Nursing supervisor Sue Coe at Northern Hospital of Surry County confirmed that two people died at the store around 2:30 p.m. Sunday. She said two who were wounded died at the hospital, just across the street from the store. Woods TV sells televisions and satellite systems.
Police said the victims' names were being withheld because their families have not been notified. Watson said all four were from Surry County, which includes Mount Airy.
WXII-TV in nearby Winston-Salem reported that people who knew the victims gathered near the store Sunday and began crying and collapsing to the ground.