State Del. Frank Pesci Jr. (D-New Carrollton) has decided not to seek a fifth term in the General Assembly and will work instead for the gubernatorial campaign of Attorney General Stephen H. Sachs.

Pesci said he will be Sachs' liaison with higher education officials, mayors and city and town councils during the campaign.

"I was struck when he came out with education as the top priority of his campaign," Pesci said of Sachs' proposal to increase the state sales tax by 1 cent and use the additional revenue to improve teacher salaries and educational programs. "Education is my field," he said.

Pesci, who has taught at several colleges and universities, is working in the Sachs campaign as a volunteer. The payoff could come later, if Sachs becomes governor.

"We have talked about a post in the executive branch," Pesci said. "He knows me, he trusts my judgment. But we have to win two elections first. If he loses, then we'll both be looking for jobs."

Pesci, 57, who served in the Maryland legislature on the House Constitutional and Administrative Law Committee and the Joint Budget and Audit Committee, said he thought long and hard about his future in politics during the last session.

He said he considered running for a fifth term, an option that would be the safest, or challenging Democratic State Sen. Thomas P. O'Reilly. But Pesci said a race against O'Reilly would be "chancy" at best.

A third option, not to seek reelection, became the most logical choice after Sachs announced his education initiative, said Pesci, who had endorsed Sachs' bid for governor last September.

"At the end of the session I talked with Sachs about helping him get to be governor. I have really been excited about his candidacy. I think Sachs' getting to be governor is more important than another term in the House," Pesci said.

Pesci will continue to receive his $21,000-a-year delegate's salary until his term expires in January. He said he will continue to supplement that income as a higher education consultant. Boergers Quits Senate Race

Montgomery County Del. Mary Boergers has decided to drop out of the race for state Senate.

She says she made that decision after talking with County Executive Charles Gilchrist about the potential problems of a campaign that would pit her against fellow Democrat Frank Shore. Such a contest, she said, could degenerate into a "contest of name calling."

Boergers made her announcement in a light-spirited press conference in Gilchrist's office last week that was attended by county union leaders and local Democrats.

In separate statements, Boergers and Gilchrist said they agreed that Boergers would be more effective in serving the interests of the county if she instead sought reelection to her District 17 delegate's seat. She is a member of the powerful House Ways and Means Committee.

Boergers said dropping out of the race was difficult because polls showed she was leading Shore. But she said she wanted to avoid a campaign that would cause painful and possibly irreparable divisions in the party. Schaefer Comes to Montgomery

Baltimore Mayor William Donald Schaefer brought his gubernatorial campaign to Montgomery County last week, telling a group of Silver Spring business executives that an improved transportation network is needed to support extensive new development in the county.

"Let me talk to you about roads," Schaefer said during a short speech in the town's business district. "What you've done here is you've planned for parking around the entrance to the Metro. You also have some problems with some streets that can be helped if you get the right man in for governor."

In an interview, Schaefer stopped short of saying he would support federal funding for extending Washington's Metro subway system. He also said he would have to give further study to another issue of particular interest in the county: whether developers should pay for traffic improvements in the areas in which they build. "You don't want to go too far and drive the developers away," he said.

The evening reception, sponsored by the Silver Spring Renaissance Committee, was one of several events Schaefer attended in areas of the state where polls indicate he is weakest.

Later, Schaefer was endorsed by about 50 members of the Montgomery County Hispanic Democrats. That backing, Schaefer said, was a "tremendous shot in the arm." Lawyer Seeks District 16 Seat

Attorney John A. Whitney, a Bethesda resident who practices law in Rockville and the District, has announced his candidacy for the Maryland House of Delegates from District 16, which includes Bethesda, Rockville, Potomac and Chevy Chase.

Whitney served as a delegate from that district from 1967 to 1969. He later worked for the National Aeronautics and Space Administration as an assistant general counsel. District 4A Candidacy Announced

Ken Coffey, the administrative assistant to Howard County Executive J. Hugh Nichols, has announced that he is a candidate for the House of Delegates in District 4A in Frederick County.

Coffey, a Republican who lives in Walkersville, has been a planner in Carroll and Frederick counties. Ewing Seeks Montgomery Seat

Gail Ewing, a Democrat from Potomac, has kicked off her campaign for an at-large seat on the Montgomery County Council . She is one of four Democrats not running on a Council slate announced last week.

Ewing, 40, has lived in the county for 30 years. A former aide to council member Esther Gelman, she is a graduate of the University of Maryland and served two terms as president of the Fox Hills West Citizens Association in Potomac.

At a press conference, Ewing promised to set up a "constituent access line" so that county residents unable to call during the day could reach her office one evening a week. Ewing also promised to push for increased day care programs in the county.

Others pursuing the two at-large nominations include Isiah (Ike) Leggett of Silver Spring, the Democratic slate candidate, and Independent Leonard Jackson of Kensington. Council member Neal Potter, who was elected at large in the last election, has not announced if he will run in District 1 or at large again. Candidate Bruce Adams is undecided whether to run at large.