Obama said he and his wife had discussed the decision "for quite some time."
"We had prayed on it. We had consulted with a number of friends and family members who are also connected to the church. And so this is not a decision I come to lightly. And frankly, it's one that I make with some sadness."
The candidate used the moment to remind voters of his Christian faith -- "Trinity was where I found Jesus Christ" -- and said he and his wife wanted to spare the congregation further disruption. Obama said the new pastor's sermons were also being scrutinized. He said critics were exploiting the most innocuous remarks and news organizations were harassing parishioners.
"That's just not how people should have to operate in their church," he said. "It's not fair to other members of the church who seek to worship in peace."
Clyde Wilcox, a professor of government at Georgetown University, said that Obama's departure from his church offered a lesson about mixing politics with faith.
"If campaigns involve pastors as precinct workers, then what they say can be scrutinized as much as any other political supporter," he said. Obama has careened between damage control and loyalty to his parish. His decision reflected an awareness that the church could be a continuing distraction for his campaign.
"It's clear that now that I'm a candidate for president, every time something is said in the church by anyone associated with Trinity, including guest pastors, the remarks will be imputed to me even if they totally conflict with my long-held views, statements and principles," he said.
In a statement, church officials said "saddened by the news" but "understand this is a personal decision."
The campaign of the presumptive Republican nominee, Arizona Sen. John McCain, declined to comment, a departure after a week in which it has commented repeatedly on Obama's speeches.
When Wright's sermons first emerged, Obama tried to calm the controversy with a speech on race in which he presented himself as a unifier who could understand both the black and white experiences in America.
At the time, Obama, while distancing himself from Wright's remarks, still said he embraced "like family" the pastor who helped him find his roots as he came of age, officiated at his marriage and baptized his daughters.
"I can no more disown him than I can disown the black community" or, he added, his white grandmother, who "on more than one occasion has uttered racial or ethnic stereotypes that made me cringe."