ED ASNER, the gruff, lovable editor of the deleted "Lou Grant" show, came to town last week, operating on the theory that one bad turn deserves another.

The president of the Screen Actors Guild, an activist actor who feels he lost his job because he sponsored a medical relief committee for El Salvador rebels, wants to get even with John LeBoutillier. The 28-year-old conservative Republican congressman, a spitball-thrower in a Brooks Brothers suit, signed a nasty letter which Asner thinks was "the thumb on the scale" when CBS was weighing "Lou Grant" for renewal. CBS says it was the ratings that decided it; Asner says it was "a new kind of blacklisting."

Asner is just one of a number of people who would like to give the boot to LeBoutillier, a slim, driven Harvard graduate who makes an attention-getting practice of dumping on institutions which he attends or serves in. He wrote a book called "Why Harvard Hates America" and, upon entering Congress as its youngest member, began reviling it for sloth and cowardice.

"Asner will have to get in line," says Rep. Tom Downey (D-N.Y.), from a neighboring district. "A lot of us are ahead of him."

LeBoutillier put his name on a letter drafted by an obscure organization known as the Council for Inter-America Security, which is not listed in the telephone book and does not return telephone calls.

The congressman said he instantly agreed to endorse the four-page, single-spaced diatribe, in which he accuses Asner of "going Jane Fonda one step better" in "acting as a fund-raiser for terrorists" and calls for a boycott of the sponsors of the "Lou Grant" show. LeBoutillier also asks for contributions for a fund "to stop Ed Asner from giving aid to our enemy."

LeBoutillier says he understands that the council sent out 50,000 of the letters, with enclosed tear-outs to be mailed to CBS president William S. Paley.

Asner blames a lot of people for the closing down of the televised "Los Angeles Tribune" -- Charlton Heston, "Ronald Reagan's stooge"; CBS, which "never even said goodbye to me"; Jerry Falwell, and former Nixon aide Bruce Herschensohn, who blasted him in Los Angeles broadcasts.

But LeBoutillier is the one he can do something about. Gloria Vanderbilt's cousin is running again, in a new district yet to be defined by the Justict Department. Democrats think he is vulnerable. His attacks on Speaker Thomas P. O'Neill (LeBoutillier called him "big, fat and out of control") have enraged party people on a national scale. He is a notorious tap-dancer on the issues: both for and against gun control; for and against the revival of the House Un-American Activities Committee; for and against no-exception antiabortion legislation; and while he voted for cuts in student loans, he now says they were "far too extreme."

The darling of the Reagan "kitchen cabinet" -- Justin Dart and Holmes Tuttle applaud him for raising $250,000 for Leo Thorsness of South Dakota, an unsuccessful applicant for George McGovern's Senate seat in 1973 -- LeBoutillier is now trying to put some distance between himself and the president on such issues as the grain sales to Russia and Social Security. He voted against the Reagan budget in Congress and supported the nuclear freeze resolution which Reagan deplores.

Asner was recruited for anti-LeBoutillier activity by Midge Costanza, the little gadfly who served in Jimmy Carter's White House. He appeared at a cocktail party for Bob Zimmerman, one of the two Democrats who wish to unseat LeBoutillier. He repaid LeBoutillier in full in his remarks to the group assembled in an O Street art gallery last Wednesday. He quoted Winston Churchill's description of an obnoxious enemy: "a man with a diarrhea of words and a constipation of ideas."

Asner is under consideration now for the starring role in a NBC documentary about Jacobo Timerman, the eloquent, tortured Argentine editor, whom he somewhat resembles. "I am going to see if John's campaign has prevented me from getting other jobs," he said grimly during a pause in the fund-raising festivities.

LeBoutillier scoffs at Asner's hostile intervention: "Ed Asner speaks with the authority of Lou Grant and the brains of Ted Baxter."

The congressman is counting on warring Democrats to return him safely to office in his new district. Zimmerman, a 27-year-old former aide to Rep. Lester Wolff, may have celebrities -- Mike Farrell, the beguiling B.J. Honeycutt of "M*A*S*H," is also in the wings -- but his rival, Bob Mrazek, minority leader of the Suffolk County legislature, has the endorsement of the Democratic establishment and the support of the labor unions.

If current efforts to talk Zimmerman out of the race fail, the two Democrats will be at each others' throats throughout the long hot summer on Long Island. The primary will not be held until Sept. 23, by which time Asner may have lost his chance to delete LeBoutillier from Congress.