Obama, who knew Pinckney personally, eulogized the pastor in front of a crowd of more than 5,000 at an arena in downtown Charleston, recalling Pinckney's humble influence on his community and at one point leading the crowd in a chorus of the hymn Amazing Grace.
"Even from a young age, people knew he was special," Obama said of Pinckney. "He conducted himself kindly, quietly and diligently. He was full of empathy, able to walk in someone else's shoes, able to see through their eyes.… That's the best thing to hope for when you're eulogized — to just say somebody was a good man."
Pinckney headed the historic African-American Emanuel AME Church and was also a state senator. He was taking part in a bible study on June 17 when a gunman entered the church, joined the bible study for an hour before opening fire, killing Pinckney and seven other parishoners. One person died later in hospital.
Obama acknowledged those other victims in his eulogy.
"To the families of the fallen, our nation shares in your grief," he said.
'A flag did not commit these murders'
Dylan Roof, 21, has been charged with nine counts of murder in connection with the shooting. He has been linked to a website with numerous racist writings and images, including ones showing him holding a Confederate flag, a Civil War-era battle flag seen by many as a racist symbol of the slave-owning American South.
Politicians and civil rights activists have called for the flag to be removed from government buildings and other institutions in South Carolina and elsewhere in the wake of the shooting while other's have insisted it is an important part of the history of the American south. Obama alluded to that controversy at the funeral Friday.
"It's true a flag did not commit these murders" he said. "The flag has always represented more than ancestral pride. For many, black and white, that flag was a reminder of oppression and racial subjugation. …
"For too long, we were blind to the pain that the Confederate flag stirred in too many of our citizens."
The president acknowledged that racism can't be solved by debate and that solutions will always be imperfect.
"There's no shortcut. We don't need more talk," Obama said. "Whatever solutions we find will be necessarily incomplete."
Joe Biden, Hillary Clinton in attendance
Obama arrived in Charleston Friday afternoon, several hours after addressing the nation from the White House Rose Garden about the U.S. Supreme Court's decision to legalize gay marriage in all 50 states.
Other speakers at the funeral praised Pinckney's personal touch and his political reach.
"We will see the Confederate flag come down. You're the one who did it." said South Carolina state senator Gerald Malloy. "Do not let race, religion or politics close the door that Senator Pinckney opened."
Bishop John Richard Bryant spoke to the congregation about Roof and his effect on the South Carolina community and the country at large.
"He wanted to start a race war, but he came to the wrong place," said Bryant. "Weeping may endure for the night, but joy comes in the morning."
Michelle Obama and Vice-President Joe Biden and his wife, Jill, also attended the service, as did House Speaker John Boehner, Democratic presidential candidate Hillary Clinton and other state and federal politicians and civil rights activists, including Martin Luther King III.