The car Roof was driving was left at the Kangaroo Express gas station on highway 74 in Shelby, about 20 miles away from Charlotte.
Roof was arrested after someone in Shelby saw a driver acting suspiciously, and called police.
Roof put up no resistance after a citizen tip led police to his car Thursday morning in Shelby, North Carolina, Police Chief Greg Mullen said.
"Acts like this one have no place in our country," said Attorney General Loretta Lynch, who announced a Justice Department hate crime investigation. "They have no place in a civilized society."
Before Roof was arrested in Shelby, he was seen at the Shell gas station on Providence Road in Charlotte. The manager there tells our sister station in Charlotte that he bought a bag of chips before he left. They have turned over their surveillance video to the FBI.
Public records show Dylann Storm Roof was arrested in Lexington County, SC on drug charges earlier this year.
The suspect opened fire during a prayer meeting inside a historic black church in downtown Charleston on Wednesday night, killing nine people, including the pastor, in an assault that authorities described as a hate crime.