President Carter's pastor, the Rev. Dr. Charles Trentham, was fired as senior minister of First Baptist Church here yesterday for dating the separated-but-not-yet divorced daughter of the president's Sunday school teacher.

The 166-to-140 vote of the congregation not to renew Trentham's contract climaxed an acrimonious three-hour debate at a specially called congregational meeting after yesterday's regular morning service.

The Carter family was absent from the service and the meeting, held in the church's fellowship hall at 16th and O streets NW. A White House aide said the president "won't be making any comment" about the matter.

Trentham, 60 and twice divorced, violated no specific church laws in dating the 28-year-old woman. But both his supporters and his critics at yesterday's meeting accused him of "poor judgment" for becoming emotionally involved with the woman instead of helping her reach a reconciliation with her husband.

"The conduct of the pastor is not in accord with the standards we have a right to expect," said Mary Sponsener, a life deacon of the church and vice chairman of the deaconate.

Charles morgan, also a life deacon, gave the congregation an explicit account of Trentham's relationship with the daughter of Fred Gregg. Gregg, who often shares teaching chores with President Carter at the Sunday school couples class, attended the meeting, but neither he nor his daughter was referred to by name during the stormy session.

According to Morgan, the young woman became separated from her husband in June 1978, and began seeing Trentham shortly thereatter. "In late July, the daughter told her father that Dr. Trentham would be her boyfriend," Morgan told the congregation.

Both the girl's mother and father entreated Trentham to stop seeing their daughter socially, and, Morgan said, "the pastor promised that he would stop seeing her." Morgan said the promise was made several times.

Nevertheless, Morgan said, the woman and her sister met the pastor in December in a Georgetown restaurant and "the sister saw the pastor and her sister in a close embrace, kissing."

Morgan became so emotional while reading this chronicle of events to the meeting that he had to call his wife, Ellen, to finish for him.

John Shouse, also a life deacon, later took up the narrative, charging Trentham with "broken promises."

Shouse contended that Trentham, when challenged, said his role was that of "seeing a young woman through a crisis" of separation and divorce. But the woman, Shouse continued, had described to life deacons who challenged her "an emotional relationship over several months' time that she did not know how to get out of."

Shouse, an attorney, said "the evidence shows clearly that the relationship began well before the divorce became final. This is inconsistent," Shouse said, with the function of a Baptist pastor, who should have tried to get the woman back together with her husband.

A secondary theme of the yesterday's debate was the conviction of many members that the church's six life deacons had, without authority, taken matters into their own hands in forcing the issue of Trentham's tenure.

Acting independently of the full 42-member board of deacons, the six life deacons met with Trentham in May and, they say, persuaded Trentham to resign.

In a letter sent to the congregation earlier this month, the life deacons said Trentham, when he returned in September from a summer vacation, reneged on his promise.

Trentham could not be reached for comment after the vote. He made an impassioned statement at the beginning of yesterday's congregational meeting and then left, "out of respect for your freedom to speak," he said.

Trentham told the congregation that "my relationship [with Gregg's daughter] has been Christian and has been with a Christian woman and has been above reproach . . . If keeping company with a Christian woman who is single is wrong . . . then tell me on what principle you base that judgment."

Trentham said he had decided not to resign because that "would throw a shadow of doubt over me, over the woman and over the church . . . I was advised to let it all come out onto the table."

He charged that "my accusers have already tried me through the press" and that they have "compromised my good name . . . You who say I should resign and spare you this agony . . . tell me how you would undo the damage to my good name . . . and to my ministry of 41 years."

"Every night," Trentham said "I have prayed for my accusers by name . . . The way of reconciliation is forgiveness . . . I forgive you; my God gives me no other function . . .I will harbor no bitterness to any one of you."

While Trentham's relationship with Gregg's daughter triggered yesterday's action, it also was clear from the discussion that his two divorces -- the first of which took place before he came to Washington -- troubled many in the congregation.

Some persons expressed dissatisfaction with his occasional speaking out on political issues and the church's involvement with a conference on disarmament last spring.

Paul Nelson, Sunday school superintendent, spoke critically of Trentham. "A pastor who is called of God would bring new [members] into the church . . . Social and political issues are secondary," he said. "We should leave affairs of state to those chosen for that task and leave Dr. Trentham to his affairs."

One of Trentham's sons by his first marriage was present during the debate.

The son, Bob Trentham, said he was there "to stand with my father in this important day in his life just as he has stood by me."

Also present was Dexter Christianberry, another attorney, who indentified himself as a life deacon from Trentham's previous church in Knoxville, Tenn.Christianberry defended his former pastor. "I know he's not capable of immoral activity," he said.