Two Soviet employes at the United Nations were charged formally with espionage yesterday for their alleged part in a scheme that had its beginnings on a Caribbean crusise.

According to a federal grand jury indictment filed in Newark, N.J., an unidentified U.S. Navy officer who is the key government witness in the case took a one-week trip from New York to Bermuda last summer aboard the MS Kazakhstan, a Soviet-owned ship.

It was on that trip that the alleged Soviet spies apparently first made contact with the American officer and set up the elaborate plot whereby they would trade him cash - $20,000, according to the indictment - for antisubmarine-warfare secrets.

The two Soviets, Valdik A. Enger, 39, an assistant to the under secretary general at the United Nations, and Rudolf P. Chernyayev, 43, a personnel officer at the U.N. Secretariat, were arrested May 20 in a Woodbridge, N.J., shopping center when they allegedly retrieved film of defense documents the Navy officer dropped off in an orange juice carton.

They have been held in lieu of $2 million bond.

A third Soviet citizen, Vladimir P. Zinyakin, 39, also was picked up at the scene, but was released because he is an attache at the Soviet mission at the United Nations and has diplomatic immunity.

He was named as unindicted coconspirator in the federal charges, and has left the country.

Yesterday's indictment adds little to what has been made public in the detailed complaint that was the basis for arrests in the case. It specifically did not explain what the Navy officer was doing on the Soviet cruise ship in the first place.

Robert J. Del Tufo, the U.S. attorney in Newark, said yesterday he could not comment beyond the specifics of the indictment.

The indictment mentions only one Navy document that was turned over to the Soviets: a 1971 "confidential" report on a Navy antisubmarine helicopter called LAMPS.

The information being passed by the Navy officer - who cooperated from the beginning with the FBI - has been cleared by intelligence officials so important secrets would not be given to the Soviets, authorities have said.

The Navy officer and his contacts would communicate by calls to pre-arranged public phone booths and notes in containers disguised as discarded trash. In one instance, according to the indictment, one of the Soviet officials hid $5,000 cash in a car radiator hose for the Navy officer.

If convicted the two could receive sentences of up to life in prison.