City police chief Gregory Mullen said eight of the victims were killed inside the Emanuel African Methodist Episcopal Church on Wednesday evening, while another person died shortly afterwards.
Police are now searching for a white male suspect in his 20s. “I do believe it was a hate crime,” Mr Mullen said.
The church’s pastor, state Senator Clementa Pinckney, was among those killed, civil rights activist the Rev Al Sharpton tweeted.
A prayer meeting was going on at the time of the shooting at about 21:00 local time on Wednesday (01:00 GMT Thursday) at the church on Calhoun Street.
In a tweet, Charleston police wrote: “Suspect in shooting on Calhoun St is a w/m approx 21 slender small build wearing a grey sweat shirt blue jeans timberland boots clean shaven.”
Speaking at a news briefing later, Mr Mullen said: “There were eight deceased individuals inside of the church. Two individuals were transported to [the hospital]. One of them has died.
“At this point, we have nine victims in this hideous crime that has been committed.
“It is unfathomable that somebody in today’s society would walk into a church when people are having a prayer meeting and take their lives,” Mr Mullen said.
A woman who survived the shooting told her family the gunman said he was letting her live so she could report what happened, the Charleston Post and Courier reported.
She said the gunman had sat in the church before standing and opening fire, according to an official from the National Association for the Advancement of Colored People (NAACP).
Charleston Mayor Joe Riley described the shooting as “the most unspeakable” tragedy.
South Carolina Senator Tim Scott tweeted: “My heart is breaking for Charleston and South Carolina tonight.”
The Emanuel AME Church: Oldest African Methodist Episcopal (AME) church in US south
.Referred to as “Mother Emanuel”
.Houses oldest African-American congregation south of Baltimore, Maryland
.Roots stem from group of free blacks and slaves in 1791
.Denmark Vesey – one of the founders – was a leader of a failed slave revolt in 1822
.Rebuilt in 1891, replacing church damaged by 1886 earthquake
.Civil rights leader Martin Luther King gave a speech at the church in April 1962
The campaign of US Republican presidential hopeful Jeb Bush cancelled an event planned in Charleston for Thursday due to the shooting.
“Governor Bush’s thoughts and prayers are with the individuals and families affected by this tragedy,” his team said in a statement.
Helicopters were seen hovering above the area and a police chaplain was at the scene.
At one point police asked residents to move away because of reports of a bomb – but police later gave the all-clear.
A group of worshipers was seen praying near the church.
“We want some real answers now,” one of the worshipers was heard saying.
The attack comes two months after unarmed black man Walter Scott was shot and killed by a white police officer in North Charleston.
The shooting prompted angry protests and highlighted racial tension in the city. The officer has since been charged with murder.
Charleston was also due to hold a ceremony on Thursday marking the eighth anniversary of another tragedy – the death of nine firefighters in a blaze at a furniture store in 2007.