CIA advisers working with rebels fighting the Nicaraguan government received reports of widespread atrocities and corruption in rebel ranks last year and compiled a controversial handbook in response to the abuses, according to leaders of the main rebel movement in accounts corroborated by U.S. intelligence sources.

Concern over the conduct inside Nicaragua of the rebels, known as contras, led CIA officials to assign an adviser known to the rebels as John Kirkpatrick, to travel to rebel base camps in Honduras in September 1983 to assess the situation, contra officials said. After a tour of the region, they said, Kirkpatrick reported back to CIA headquarters in McLean, Va., where compilation of the manual was begun.

Kirkpatrick returned to Honduras 10 days later and, working with four contra officials, put together the 90-page booklet, according to Edgar Chamorro, who headed propaganda activities at the time for the Nicaraguan Democratic Force, or FDN. He said the manual was printed and distributed in Tegucigalpa, the Honduran capital, in late November. The manual, Chamorro said, was designed to moderate contra conduct and provide guidelines for attempts to win support among Nicaraguan civilians.

The manual became highly controversial when it received wide attention in Washington two weeks ago, mainly because of passages advocating that selected Nicaraguan government officials be "neutralized." Actually, according to contra leaders, its purpose was to stem indiscriminate killings and other abuses mentioned in the reports reaching CIA officials.

The portions of the manual dealing with specific "neutralization," they said, were designed to steer the use of violence into more selective and productive channels.

One result of the campaign to bring rebel troops under control, according to various contra leaders, was the arrest and court-martial of a contra commander and several troops who "went crazy" during a killing spree inside Nicaragua during the summer of 1983. Members of the group were found guilty and executed late last year, they said.

A CIA public affairs official, asked about the general contra account of events last week, declined to comment. But two U.S. intelligence officials confirmed the contra version.

Although accounts of contra abuses began to appear from the beginning of the U.S.-funded "secret war" against Nicaragua's ruling Sandinista Front in late 1981, it was not until last year that there were widespread confirmed reports. Incidents continue to be reported this year, and the overall effectiveness of the campaign to stem the abuses has been difficult to assess.

Since the controversial portions of the manual became public, President Reagan and the House and Senate intelligence committees have requested investigations and an explanation about how it came to be written. According to Sen. Daniel Patrick Moynihan (D-N.Y.), the deputy inspector general of the CIA is expected to submit a report of his internal investigation to CIA Director William J. Casey, after which congressional hearings are to be scheduled.

Following an initial CIA briefing last week, Sen. Malcolm Wallop (R-Wyo.) said he had read the manual and that, "taken as a whole, the manual calls for the avoidance of violence to the extent possible and was designed to put restraint and a rationale on guerrilla operations . . . As a whole, the manual is a code of conduct for which the United States ought not to be ashamed."

An aide to a prominent Senate Democrat who also was familiar with the CIA briefing, however, said he had expected the CIA to seek to cast the manual in the best possible light by explaining it as a positive effort against abuses.

"But there's no logic to it," he said. "It's a deeper hole than before. The way we turn them into good guys is to make them political assassins? Give me a break."

The aide noted that the CIA "has never been consistent" on the degree of control it had over the contras. "They wanted to be able to say everything was fine unless there was a problem, in which case it was renegades," he said.

The general outline of accounts by contra officials in interviews over the past week coincides with earlier reports that the CIA had received news of rebel abuses as early as July 1982.

But the officials provided more details about the specific nature of the abuses and the direct connection between them and the writing of the manual. In addition, these accounts call into question the extent to which CIA officials in Washington participated in compiling the final version of the manual.

Chamorro said the adviser, known to the rebel troops as Juanito, met with him at the Alameda Hotel in Tegucigalpa on Sept. 4-6, 1983. Chamorro said he then escorted Kirkpatrick to a rebel base camp near Paraiso, Honduras, along the Honduran-Nicaraguan border. At the time, Chamorro said, about 1,000 rebels there were preparing for an attack on the Nicaraguan town of Ocotal.

During his visit to this and other rebel camps that month, Kirkpatrick learned of numerous instances of indiscriminate killings of Nicaraguan civilians, forced recruitment, rapes of young women, torture and occasional public executions of FDN soldiers accused of disobeying orders. In addition, Chamorro said, Kirkpatrick also learned of widespread corruption among some rebel commanders.

The CIA adviser took his findings to the CIA station chief in Tegucigalpa and returned to Washington, where he also reported his findings to superiors at CIA headquarters, according to the rebel and intelligence sources.

On his return to Tegucigalpa 10 days later, he began working on the manual, called "Psychological Operations in Guerrilla Warfare," Chamorro said.

Chamorro said in a series of interviews here that the American adviser was particularly concerned about charges that some contra task force commanders were stealing money provided by the CIA to feed the troops, which amounted to $1 a day for each fighter.

"How can they do this?" Chamorro quoted the American as saying. "These peasants are laying down their lives for the cause, and these son-of-a-bitch commanders are stealing their money for food."

Chamorro said the the American adviser spoke Spanish, and closely identified with the rebels, treating those he worked with well. A specialist in propaganda activities, Kirkpatrick traveled frequently to rebel base camps between September and November 1983 to hold classes on public speaking, and instruct rebels in the use of cameras, tape recorders and loudspeakers, he recalled.

"He always emphasized the need to respect the population," said Chamorro, who worked closely with him. "At the beginning of each course, Juanito would give each student a new set of clothes and a baseball cap, and bought them food. They had a lot of respect for him."

In a speech he gave in one class along the Honduran-Nicaraguan border, Chamorro recalled, Kirkpatrick, of Irish descent, equated the Nicaraguan rebels with the Irish Republican Army, which he said was fighting a similar battle to rid its country of British domination.

Kirkpatrick learned during tours of rebel base camps that some rebel commanders would, as punishment, hang a rebel upside down by his feet from a tree, Chamorro said.

Another commander would bury a rebel up to his neck for the slightest infraction, he added. One, known as Commander Suicide, reportedly executed a group of rebels last year, in front of his troops, for refusing to go on a mission the rebels insisted was impossible and suicidal.

Suicide was one of the best known of the contra commanders, both inside and outside Nicaragua. In early 1983 he allowed two reporters, including a correspondent of The Washington Post, to accompany him and his troops on a mission into Nicaragua from a contra base camp in Honduras in what appeared in part to be an effort to publicize the rebels' military prowess and level of support within the Nicaraguan population.

A former member of the National Guard of Nicaraguan dictator Anastasio Somoza, Suicide fled the country with hundreds of his fellow soldiers following Somoza's overthrow by the Sandinistas in 1979. After taking refuge in Honduras, he and his men began guerrilla strikes against the Sandinistas and their Cuban advisers inside Nicaragua even before being incorporated into the U.S.-funded effort that was approved by Reagan in November 1981 as a means of stopping alleged Nicaraguan arms shipments to leftist guerrillas in El Salvador.

According to widespread accounts of various rebels and FDN leaders, Commander Suicide, in charge of rebel activites in Nueva Segovia province, "went crazy" when his wife, also a rebel, was killed last year and "went on a rampage" in May of last year. Suicide and a group of close advisers carried out indiscriminate killings, kidnapings and rapes of Nicaraguan civilians, they said.

One FDN leader in charge of political education and psychological operations for the rebel group said he spent time with Commander Suicide last year, attempting to curb abuses. The rebel leader, Salvador Icaza, said in a telephone interview that these abuses did not represent FDN policy, and equated these instances with the 1968 My Lai massacre in Vietnam carried out by American troops. "My Lai did not represent what the American effort in Vietnam stood for," he said.

Commander Suicide was eventually pulled out of the field by FDN leaders and held under house arrest by Argentine military advisers at a safe house outside Tegucigalpa for several months, contra sources said. The Argentines, working with the rebel military high command at the time, helped to establish a court-martial for Suicide and others accused of "war crimes." They were tried and sentenced to death and were executed late last year, according to several contra commanders.

The psychological operations manual, Chamorro said, was produced by a five-person team, made up of Kirkpatrick; Chamorro; a man named Ortiz, who ran the 15th of September contra radio station; an unidentified woman who typed the manuscripts and helped with translations, and a man identified as "Plato," who did the final proofreading of the manual and took it to a local printer in Tegucigalpa.

About 2,000 copies were brought to a rebel safe house in Tegucigalpa Nov. 21, 1983. The American left Honduras a few days later, Chamorro recalled, and returned in early January 1984 with a man Kirkpatrick said was to be his replacement, Chamorro recalled.

Chamorro said there was only one printing of the manual that he was aware of, and the final manuscript was not sent to Washington before being sent to the printer. He said that in late December he tore out two pages from all of the books except about 200 that already had been distributed. He said the pages dealt with the hiring of professional criminals and the selective killing of the contras' own men to create "martyrs" for their cause.

Chamorro's account of the Tegucigalpa printing and his own limited editing appears at variance with other versions, including one offered by Reagan in his Oct. 21 debate with Democratic presidential candidate Walter Mondale. The president said the CIA edited most of the 2,000 copies of the printed manual to excise portions dealing with "neutralization" before allowing them to be distributed.