Twenty-seven months ago, when he was just settling into his new job as general counsel of the Department of Energy, Lynn R. Coleman signed an angry letter to the D.C. Bar protesting a new ethics rule that seemed to limit the opportunities for federal lawyers to enter private law practice when they left public service.

Despite the protest, the ethics rule went into effect. But it has not limited opportunities for Lynn Coleman.

Next week Coleman will be leaving public service with the rest of the Carter administration, and he says he will reenter private practice here. According to other lawyers in the energy field, Coleman is negotiating with two law firms on terms that would give him about a fourfold increase in his $60,000-per-year government salary and provide a guaranteed job for an assistant he hopes to bring with him into private practice.

Coleman is not alone. Among the hundreds of Carter appointees now job-hunting at the law firms and lobbyists' offices clustered around Connecticut Avenue and K Street NW, a few dozen federal lawyers have found that the prestige, know-how and know-who they gained in the government add up to senior jobs and big money in Washington's legal community.

Some of the lawyers in demand -- people like Vice President Mondale and White House domestic policy adviser Stuart Eizenstat -- are quite familiar to newspaper readers. But others hardly known to the general public have received a flood of inquiries.

One of the hottest tickets in Washington right now is Bernard M. (Bobby) Shapiro, a hard-working and highly respected accountant and tax lawyer whose position as chief of staff of the Joint Committee on Taxation has made him Congress' leading expert on the tax code. Shapiro says he has had "a lot of phone calls" but hasn't yet decided which offer to accept.

A lawyer from one of the firms courting Shapiro says an offer to him would probably include "a partnership, obviously, and a guarantee of almost three." This last is the lawyer's way of describing a salary close to $300,000 per year.

Other federal lawyers particularly sought after, according to local lawyers, include John Shenefield, who was antitrust chief and then associate attorney general in the Carter Justice Department, and Philip L. Verveer, head of the Federal Communications Commission office that regulates telephone and microwave communications. Shenefield will join the D.C. office of Millbank, Tweed, a big New York firm. Verveer will work at the D.C. firm of Pierson, Ball and Dowd.

Although terms and offers vary considerably, top government lawyers can generally command from two to four times their government salary when they enter a law firm as a partner. Thus they will make considerably more than the $75,000 or so in annual pay that most newly named partners in Washington firms could expect to earn.

The firms consider big-name government lawyers worth more than the normal new partner for two reasons. Connections and knowledge acquired in a top federal job can help the firm's current clients, and a new partner with political cachet can help lure new clients at yearly retainers that can reach several hundred thousand dollars.

The lawyer who can bring in new business is known in the legal community as a "rainmaker," and the best rainmakers can just about set their own terms when they negotiate with a law firm.

One request the sought-after government officials often make is for a "package deal" in which the law firm offers to hire one or two chosen aides along with the new partner. The big-name lawyer and the aide can then both command premium salaries. As a local lawyer put it, "you get two for the price of three."

Lawyers who have been talking to Mondale -- he is said to be considering jobs with two New York firms and the Washington office of a Minneapolis firm, O'Connor and Hannan -- say the tentative terms include a salary around $250,000 together with a job for his chief of staff, James Johnson.

This was disconcerting to lawyers at one of the firms talking to Mondale. "Jim Johnson is a top-class guy, really without peer, but there's one problem," a partner said. "He's not a lawyer."

For younger government lawyers -- people about five years out of law school -- who hold less exalted titles in the bureaucracy, a package deal may be the only way to break into a big firm. Because of the rather rigid stratification of junior lawyers at the firms, it is frequently impossible to find a spot for a lawyer who is too senior to start at the bottom but too junior to be made a partner.

A 30-year-old lawyer who found himself out of work after the November election sought a job at Steptoe and Johnson, a big Washington firm that is talking to several outgoing Carter appointees. The applicant says he was told politely that the firm was mainly interested in people at the assistant secretary level or higher, because they can be made partners from the outset.

One factor that has apparently not diminished the law firms' efforts to hire top government lawyers is the tough new ethics rule that the Energy Department's Coleman complained about in the fall of 1978. The D.C. Bar rules say that a former government lawyer and the firm that hires him both have to refrain from dealing with any case the lawyer worked on while in the government. The letter Coleman and other senior government lawyers signed said that the D.C. Bar had no right to set employment restrictions for government lawyers.

But lawyers in and out of government say the rules seem not to have restricted opportunities for lawyers leaving the Carter administration. "We think it's obvious some of these people can be valuable . . . without violating the rule," said a partner in one local firm.

Coleman was an energy lawyer with the Houston firm of Vinson and Elkins before he entered government, and local energy lawyers say he will almost surely deal with energy issues when he goes back to private practice. Lawyers here say that he has told law firms he would like to bring Erica Ward, another federal energy lawyer, with him when he leaves the government.

Coleman said in an interview that he had not decided exactly which firm or what kind of practice he would choose. He said Ward "might or might not" join the same firm he does. "If I could talk her into coming with me, I'd be the happiest man in town."