The arrest of a former top Japanese general on espionage charges raised suspicions today that both Japanese and American military secrets may have been delivered to Soviet agents.

The veteran military intelligence officer, Yukihisa Miyanaga, 58, and two other men still involved in intelligence work were arrested last night by Tokyo police and accused of leaking defense secrets to Soviet agents.

It was the first post-war spy case involving Soviet agents and members of the Japanese military forces and it rocked a defense organization that prides itself on national loyalty.

Gen. Shigeto Nagano, chief of staff of the Ground Self-Defense Force, told a news conference he was shocked and said, "It would be the most deplorable incident in the history of the Self-Defense Force."

A Foreign Ministry source said the government is prepared to take diplomatic reprisals if it is proved that members of the Soviet Embassy here were involved.

According to press reports, Miyanaga admitted receiving money from a Soviet contact and passing some of it along to two associates in the military intelligence services. The Japan Broadcasting Co. identified the Soviet agent as Col. Yuri N. Koslov, military and aid attache at the Russian embassy and its top intelligence officer.

[United Press International reported from Tokyo that the 46-year-old Koslov abruptly left Tokyo less than 24 hours after Miyanaga's arrest. The Soviet embassy rejected a Japanese request to question the Soviet military attache and said Koslov's sudden departure was because of "his mother's grave illness."]

Since Japan has a limited defense establishment, it was believed Miyanaga may have been passing on information about U.S. military secrets. Defense authorities were most concerned about secrets involving missiles and radar supplied by the U.S., in addition to information about the stationing of Japanese troops.

Police searched their homes of all three men arrested and discovered a number of classified documents, a code book, radio transmitters, and transmission logs.

The other two were identified as 1st Lt. Eiichi Kashii, 45, a member of the Self-Defense Force intelligence unit in charge of documents, and Warant Officer Tsunetoshi Oshima, 50, a member of the research department.

Miyanaga, who retired in 1976, had been under surveillance for some time, police said, and was arrested after he allegedly was seen receiving documents from Oshima on a Tokyo street.

Miyanaga was charged with forcing the other two to steal secret documents. Both had been his subordinates in intelligence work when he was on active duty.

All three men were specialists in the collection of intelligence on the Soviet Union and are believed to have had access to material revealing what Japanese and U.S. intelligence agencies know about Soviet military capabilities.

After his retirement in 1976, Miyanaga lived alone in an apartment in Tokyo and ran a small appliance sales company. He was divorced and apparently had maintained contact with his former subordinates in the defense agency.

Police were said to suspect that Miyanaga's contacts may have started while he was in active service and continued during his retirement.