People of all walks of life gathered at Morris Brown AME Church to remember those killed at the Emanuel African Methodist Episcopal Church on Wednesday night.
Dylann Roof, 21, has been arrested on suspicion of the attack which police are treating as a hate crime.
Six women and three men, including the pastor Revd Clementa Pinckney, 41, who had a wife and two children, died in the incident which has stunned America.
Prayers were said at churches across Charleston, South Carolina, as well as outside the US Capitol.
Senate chaplain Barry Black said: "Our hearts ache because, in the future, people will feel fear in the house of God when they should feel peace and serenity."
In a speech at the White House US President Barack Obama said he knew the pastor who was killed and several other members of the church.
He was joined by Democratic presidential hopeful Hillary Clinton in calling for tighter gun controls following the mass shooting.
The president said: "At some point, we as a country have to reckon with the fact that this type of massacre does not happen in other advanced countries."
Ms Clinton said her country had to face the "hard truths" about guns and race.
She added: "How many innocent people in our country, from little children to church members to movie theatre attendees, how many people do we need to see cut down before we act?
"In order to make sense of it we have to be honest," she said. "We have to face hard truths about race, violence, guns and division."
Elsewhere First Lady Michelle Obama and her elder daughter made an unannounced visit to a church to pray for the victims.
Mrs Obama and Malia took time out of their visit to Milan to stop at the city's Duomo cathedral to light a candle for the dead.
Speaking after the vigils, Revd Ross Hodges, from Christ Church Presbyterian in Charleston, told Premier's News Hour: "This is a tragedy that's hard to even put it into words, it's hard to comprehend and wrap your mind around. For Christians, really the only solace we have in the face of something like this is to turn to our Lord and to cry out - to grieve and mourn and weep together.
"It's actually bringing some solidarity in the Christian community because the great majority of people here are not racist. Certainly in the Christian community, we love our brothers and sisters across racial and ethnic lines.
"This is one of those catalysts that, in God's infinite wisdom, somehow bringing good out of evil, can bring Christians together across racial lines, and can actually help create conversations and put people face to face - where we can look each other in the eye and say: 'I love you'."
Listen to Premier's Antony Bushfield speaking to Revd Ross Hodges on the News Hour: