Edwin Gibbons Moore II testified at his espionage trial today that he threw a package of secret documents through a fence surrounding a Soviet residence in Washington at the instruction of a mysterious operative named "Joe" whom Moore maintains works for the CIA.

Taking the witness stand for the second day in his own defense, Moore, who retired from the CIA in 1973, also said a $2,057.68 debt he had at the CIA credit union was mysteriously paid off last November six weeks before Moore threw the documents through the Soviet's fence. The debt payment, Moore testified, was one of the demands he made to "Joe" before agreeing to work with the man on a project "Joe" said was being run by the CIA.

Moore, 56, of 4800 Fort Summer Dr., Bethesda, has pleaded innocent by reason of insanity to the charges that he offered the documents to the Soviets last Dec. 21. He was arrested after a guard at the residence at 3875 Tunlaw Rd. NW. turned the envelope containing the documents over to an Executive Protective Service officer, thinking it might be a bomb.

CIA spokesmen have denied in court that Moore had any connection with the agency after his 1973 retirement.

Moore's contention that his CIA credit union debt was paid off was supported by a copy of his credit union statement introduced into evidence by the defense. It showed that a balance of $2,057.68 was paid in full last Nov. 12.

Under questioning by his attorney, Courtland K. Townsend, Moore said: "I did not pay that loan."

Moore testified that he met "Joe" last summer in Elm City, N.C.

Moore had gone there, he said, to "dismantle" a large home - which neighborhood legend held had once been "haunted" - that once had been occupied by one of his grandfathers. Moore said his intention was to assemble at this own home in Bethesda enough memorabilia to reconstruct a room exactly like his late grandfaters's.

It was while he was helping two Vietnamese workers clean out the "bats and mice" from his grandfather's bedroom, Moore testified, that "Joe" turned up on the veranda.

"He was about 6-feet-1 or 2 inches tall, very stockily built," Moore testified. "Joe" reminded him of someone he had known in the CIA's "Alien Section," he said.

Moore said he was skeptical that "Joe" actually was connected with the CIA until "Joe" mentioned several personal items, including Moore's CIA credit union debt, as well as the cover names, "Gary C. Trendall" and "John Camipachiero," which Moore said had been assigned to him during his years as a CIA office worker, between 1952 and 1973.

Moore testified that "Joe" persuaded him to participate in a CIA "operation" that "Joe" described as designed to counteract the "bad public relations" the CIA received because of its involvement in the Bay of Pigs invasion and Watergate.

He said he agreed to work on the project in exchange for $50,000 and was given a $500 downpayment in $20 bills.

Shortly thereafter, Moore testified, CIA documents began appearing at the Elm City home. A typewriter that had been stolen in 1974 from his car parked in the basement of the Ames Building in Rosslyn also turned up in Elm City, he said.

The documents were stored throughout the Elm City house, in a van where he was living as he worked on the house and in a nearby warehouse, Moore testified.

He said that some of the documents are still in that warehouse, located near Pender and Main streets in Elm City.

Moore told the U.S. District Court jury here that he saw "Joe" only once, but talked to him another dozen times by telephone in North Carolina and Bethesda. He said he went to preselected telephone booths every other day at noon and waited 15 minutes in case "Joe" called.

At "Joe's" instruction, Moore said, he took some documents from a CIA office in the Washington area, where they had been set aside for him, and carried them home to Bethesda.

Twice, he said, he found written instructions from "Joe" in an abandoned TV set on an empty lot near his home.

When he realized the Soviet Union was involved in "Joe's" plan, he upped the price of his cooperation to $100,000 plus payment of his credit union debt and other favors, "because I could get knocked off," he said.

The day after he threw the documents through the fence at the Soviet residence, Moore said, he thought the plant had failed because, although a van bearing license plates used by the Soviets dropped off a package across from his home, as his note had demanded, the van and the package was the wrong color. At the same time, he said, his phone rang three times, the prearranged signal with "Joe" to "abort" the plan.

A neighborhood boy went near the package and Moore said he rushed over and put his foot on it because "I though it might be a bomb" and he wanted to protect the youth.

Then, he said, he picked up the package, started to walk to his home, and "all kinds of people appeared . . . and I was being arrested for espionage."