Although many whites regard it as an emblem of heritage and pride, the flag is widely viewed by blacks as a symbol of the state's dark past of slavery and more recently segregation.
Dylann Roof, the accused Charleston church killer, was photographed posing with the flag in pictures accompanying an online "manifesto".
It also emerged that the leader of a self-styled "white rights" group that inspired Roof has made campaign donations to several leading Republican politicians, including three 2016 presidential candidates.
Mr Obama made his jarring comments in a podcast with the comedian Marc Maron. "Racism, we are not cured of it," he said. "And it's not just a matter of it not being polite to say n***** in public.
"That's not the measure of whether racism still exists or not. It's not just a matter of overt discrimination. Societies don't, overnight, completely erase everything that happened 200 to 300 years prior."
Mr Obama emphasised that the US had made progress on race relations in recent decades, citing his own experiences as the son of a white American mother and an African father.
"I always tell young people, in particular, do not say that nothing has changed when it comes to race in America, unless you've lived through being a black man in the 1950s or '60s or '70s," he said.
But he noted that that the legacy of slavery and the discriminatory laws of the South continues to casts "a long shadow and that's still part of our DNA".
The White House said that it was not the first time Mr Obama had spoken the N-word, using it most notably in his memoir. But his blunt language comes as he displays a growing openness about discussing race in the later years of his presidency.
In Charleston, public protests since the killings had focussed on demands for the removal of the Confederate flag, even before photographs emerged of Roof posing with the old battle standard.
South Carolina's Republican governor Nikki Haley was reportedly discussing moves with the state legislature to remove the flag from the statehouse grounds. She was expected to announce her plans at a press conference on Monday night.
Lindsey Graham, the South Republican senator and presidential candidate, would call for the removal of the flag in a joint appearance with Ms Haley, it was reported.
Joe Riley, the Democrat mayor of Charleston, earlier appeared with African-American community and political leaders to call for the flag to be moved to a museum.
"The time has come for the Confederate battle flag to move to a place of history," he said, describing it as an "affirmation of hatred" for racists like Roof.
In an online "manifesto", Roof said that he had been inspired by an extremist group called the Council of Conservative Citizens whose leaders have repeatedly denounced African-Americans as inferior to whites and violent criminals. He reportedly told police that he hoped to spark a race war with his rampage.
The group's president Eric Holt has donated to the presidential campaigns of Republican senators Ted Cruz and Rand Cruz as well as other leading conservative politicians, according to financial records first reported by The Guardian.
When contacted about the donations, Mr Cruz's team said that it would return the funds while Mr Rand's campaign said that it would donate the money to assist Roof's victims.
The Southern Poverty Law Centre (SPLC), the leading US monitor of hate groups, describes the council as a supremacist organisation virulently opposed to "race mixing".
Heidi Beirich, an SPLC director, told The Telegraph that America faced as great a domestic terror threat from lone wolves radicalised by such white extremist groups as it does from Islamic jihadists.
"This was not an isolated hate crime but is part of a trend of such attacks," she said. "White supremacists are just dangerous and should be treated as much of a threat as jihadists. More Americans have been killed by these people in the US than by jihadists since 9/11."
The council has its roots in the white supremacy movement that fought a failed attempt to block school desegregation in the South. Mr Holt said that his group was opposed to violence but that he was not surprised that Roof had learned about "black-on-white violent crime" from its website.