The Charleston police identified the gunman as Dylann Roof of Lexington, South Carolina. They arrested him from neighbouring North Carolina.
Churches around Charleston rang their bells in solidarity with Emanuel AME.
US President Barack Obama paid tribute to the victims of the Charleston shooting, saying the nation has been blind to the "mayhem" caused by gun violence.