Four months ago, Mayor Edward I. Koch swept into a third term with 78 percent of the vote. His autobiography had topped the national best-seller list for weeks, sparking a successful off-Broadway musical. Brash, funny, tough -- and with an unassailed reputation for personal honesty -- Koch liked to say, "I don't get ulcers. I give them."

Two weeks ago, the same man stood wearily before reporters at yet another news conference on city corruption and confessed, "I feel like opening the window and yelling out the window, 'I'm not going to take this anymore.' "

Hardly a day has passed in almost two months without revelations of new grand jury investigations into allegations of bribery, influence-peddling, fraud and conflicts of interest by Koch administration officials or political associates.

What began Jan. 10 as the mysterious suicide attempt of Queens Borough President Donald R. Manes, a close friend and political ally of Koch, has erupted into a lava flow of scandal charges and intrigue unmatched since the police-corruption revelations of the early 1970s.

Since Koch's reelection, 21 high-ranking officials of his administration have resigned, half of them after charges of improprieties. Whole city agencies have been spotlighted as patronage fiefdoms. The investigations have focused attention on the perils of one-party politics in a city dominated by Democrats.

Two U.S. attorneys, five district attorneys, the state attorney general, the city's Department of Investigations, Koch's special investigator, a city council investigator and the city's Board of Ethics have entered the fray with separate and sometimes overlapping inquiries. The city's two most respected prosecutors, U.S. Attorney Rudolph W. Giuliani, a Republican, and District Attorney Robert M. Morgenthau, a Democrat, have quarreled publicly over jurisdiction.

"This is the biggest set of bombshells that look like major scandals in a long, long time," Attorney General Robert Abrams said. "Two months ago, this city was calm. The government was overwhelmingly reelected. Now, suddenly it's in total turmoil."

"The allegations are surprising to most New Yorkers," Giuliani said in an interview. "Before the beginning of the year, the assumption was that New York City government was pretty clean at the upper levels. The general impression was that there was some corruption but that it was not a major problem."

Initially, Koch shrugged off the allegations as applying only to "a few rotten apples" among the city's 300,000 employes.

Late last month, he did an about-face, declaring, "I am embarrassed, chagrined and mortified that this kind of corruption could have existed and that I did not know of it . . . . My administration lost the distance and the controls I had hoped to maintain in order to avoid the undue influence of party leaders on the workings of government."

Koch has proposed changes to curtail patronage, limit campaign contributions to city officials, broaden financial-disclosure rules and prevent party leaders from doing business with the city. Gov. Mario M. Cuomo met with top prosecutors to push for antibribery and racketeering bills to improve a political system that, he said, has "tolerated and maybe even encouraged corruption."

Although the inquiries reach into every borough and more than a dozen city agencies, only one official has been indicted. Geoffrey Lindenauer, former deputy director of the Parking Violations Bureau, has pleaded not guilty in federal court to 39 counts of extortion and racketeering.

Lindenauer, a Manes protege, was charged with taking $410,000 in bribes from companies that collect delinquent parking fines. One contractor said he paid bribes on orders from Manes, who as chief executive and Democratic Party leader of a borough with 1.9 million people, was one of the city's most powerful politicians. Lindenauer met with prosecutors last week in an effort to negotiate a plea on lesser charges in exchange for testifying against Manes and others.

Manes' lawyer, Michael F. Armstrong, former chief counsel of the Knapp Commission that investigated police corruption, said, "There's an awful lot of smoke around and, so far, not very much real fire. . . . What has been brought out so far does not warrant the conclusion that this city is a sinkhole of corruption."

Nonetheless, the parking scandal touched a raw nerve in this congested city where 45,000 parking tickets are issued each day. The disclosure that the city has a backlog of $1.1 billion in unpaid parking fines fueled public outrage.

A news media war erupted, with television stations, the tabloids, the Village Voice and The New York Times scrambling for scoops. The Daily News runs a regular "Scandal Scorecard" and New York Newsday has a "City Scandal Rap Sheet" with the latest developments.

Lindenauer's background -- a psychoanalyst and sex therapist who befriended Manes' wife, became a regular in the Queens Democratic Party and was placed in government with no experience -- has enlivened the story. "Free-Love Lindenauer," the defendant has been dubbed by the New York Post.

A remarkable aspect of the case is its serendipitous beginning. In July 1984, convicted swindler Michael Burnett was picked up on a gun charge in Nashville and, seeking leniency, told the Federal Bureau of Investigation about a scheme to bribe Chicago officials. Burnett was wired for sound and, during an undercover investigation, his boss, a contractor who collected unpaid parking fees, boasted that he had bribed New York officials for years. The U.S. attorney's office in Chicago notified Giuliani, who picked up the investigation.

Besides Manes, two other high-level political figures and close Koch associates are the focus of corruption investigations: Bronx Democratic leader Stanley M. Friedman, Koch's former deputy mayor, and Staten Island Borough President Ralph Lamberti.

Friedman represented a company called Citisource, of which he was a principal owner, in obtaining a $22.7 million city contract to manufacture hand-held computers for issuing parking tickets. Lindenauer helped Friedman obtain the contract and was indicted on four counts of racketeering and mail fraud in connection with its award.

No charges have been filed against Friedman, who is under investigation about whether he fully disclosed ownership before lobbying for the contract. The Securities and Exchange Commission is reportedly inquiring into possible stock manipulation by company insiders, and the state is probing whether the company made misrepresentations in its stock prospectus.

Lamberti is the subject of a reopened federal inquiry into whether he helped a real estate partner buy city land at a bargain price.

Meanwhile, Bronx Borough President Stanley Simon and other Bronx political figures have been subpoenaed by a federal grand jury in connection with alleged kickbacks in printing contracts with a firm owned by Yonkers Mayor Angelo Martinelli and his relatives.

Koch appointees who have resigned under pressure in recent weeks include:

*Transportation Commissioner Anthony Ameruso, who oversaw the Parking Violations Bureau and who, Koch said, violated the "spirit" of disclosure laws by investing in a lucrative land deal with a Queens judge convicted of bribery and a carting company official linked by authorities to organized crime.

*Taxi and Limousine Commissioner Jay Turoff, target of a city probe as to whether he had a financial interest in two companies doing business with his agency.

*General Services Commissioner Robert Litke, under whose watch a city lease negotiator was convicted of collecting $1.5 million in bribes from landlords.

Housing Authority Chairman Joseph Christian and General Manager John Simon, after one-fourth of the agency's superintendents were arrested on bribery charges.

*Investigations Commissioner Patrick McGinley, after Morgenthau began probing his handling of a disability pension for a worker who claimed he injured his back while installing an air-conditioner for McGinley's asthmatic wife.

Corruption in New York is nothing new, but the broad scope of current allegations has stunned the political establishment. Koch has enjoyed a reputation of being less beholden to machine politics than some of his predecessors.

"This is a major scandal," state Sen. Franz Leichter said. "It has taken the fig leaf off of the mayor. He had looked the other way."

At the annual "Inner Circle" dinner March 1, where local reporters host and roast the mayor and he responds in kind, the mood was unusually subdued. With help from cast members of the Broadway musical "Singing in the Rain," Koch danced and sang in a skit entitled "Singing in the Arraign." At the end, he was drenched with the contents of two large watering cans.

"The show must go on," Koch said. After a pause, he added, "And city government will go on."