The Japanese government today announced the expulsion of a Soviet diplomat here on charges that he had attempted to steal Japanese computer secrets and to set up an industrial spy ring through a senior executive at a major Japanese computer company.

Tokyo's action capped a four-year investigation by Japanese police and represented the first time since World War II that a Soviet diplomat has been sent home on spying charges. It was expected to lead to a strengthening of Japanese regulations designed to check the illegal flow of sophisticated technology to the Soviet Union, Foreign Ministry sources said.

Arkadiy A. Vinogradov, a first secretary at the Soviet Embassy in Tokyo, returned to Moscow last Sunday on a regularly scheduled Soviet Aeroflot flight accompanied by his wife and son. Chief Cabinet Secretary Masuharu Gotoda said today that Vinogradov, 41, had been asked to leave because of his involvement in activities "incompatible with his status as a diplomat."

The move was viewed by analysts here as part of a bid by the government of Prime Minister Yasuhiro Nakasone to rally to the side of the Reagan administration, along with other western governments, over Washington's concern about high technology falling into Soviet hands. It followed expulsions earlier this year of Soviet diplomats from Switzerland, Spain, Denmark, Britain, France and the United States.

In contrast with these cases, however, Tokyo stepped back from declaring Vinogradov persona non grata, a designation that would have forced authorities to issue a summary deportation order. After examining evidence supplied by Japanese police late last month, the Japanese Foreign Ministry summoned Soviet Charge d'Affaires Lyudvig A. Chizhov last Friday and requested that Vinogradov leave Japan "voluntarily."

A Foreign Ministry spokesman quoted Chizhov as saying that the charges were "groundless" but that he would convey the Japanese request to Moscow. Soviet Embassy officials were not available for comment.

Nakasone told Japanese reporters today that the government had acted "on the basis of sovereign national rights and, legally, this action is correct. Nothing has changed, however, in Japan's position of maintaining stable and friendly relations with the Soviet Union."

At the Williamsburg summit in late May, Nakasone stressed Japan's determination to cooperate closely with its western partners in dealing with East-West security issues. According to analysts here, however, Japan's measured approach to the Vinogradov case reflected Tokyo's desire to keep relations with Moscow on track while assuming its responsibilities toward the western alliance.

Senior Foreign Ministry sources stressed that the government's decision "had nothing to do" with the expulsion of Soviet envoys by western countries and had been made strictly on the basis of police evidence.

According to Japan's National Police Agency, B.N. Kakorin, 42, a Soviet engineer whom officials identified as a KGB agent, first approached a senior executive of a computer company in Kanagawa Prefecture southwest of Tokyo in 1978, seeking confidential information on state-of-the-art technology.

After Vinogradov's arrival in Japan in August 1980, the two Soviets teamed up to increase their demands. In return for payment from Moscow, they urged the executive, who has yet to be identified, to establish an industrial spy network to tap into the country's reservoir of advanced technology on a long-term basis.

Police began monitoring the Soviet activity in 1979, later videotaping clandestine meetings and interrogating the executive. Kakorin left Japan in January 1982 before the police had fully developed their case. Late last month, the police notified the Foreign Ministry of "undesirable activities of collecting industrial secrets" involving Vinogradov, which led to the request for his immediate departure. According to Japanese press reports quoting police sources, the executive did not hand over company secrets but did pass on several volumes of company publications on computer technology. The executive's activities did not constitute a criminal act, the sources reportedly said.

A police spokesman said no other Soviets or Japanese were involved in the case and that the spy ring was never developed.

Kanagawa, a key part of the highly concentrated industrial belt on Japan's Pacific Coast, odten has been compared to California's Silicon Valley as a center of Japan's booming high-technology sector.

The issue of industrial espionage churned up a controversy here when executives of Hitachi and Mitsubishi Electric were arrested in California last year and charged with the conspiring to pirate computer secrets from International Business Machines Corp.

The FBI undercover operation that led to the arrests was part of U.S. government action to stem the illicit flow of technology to the Soviet Union. U.S. officials have complained that Japan, with its relatively lax export controls and its eagerness for new markets, has allowed sophisticated technology with possible military uses to fall into the hands of the Soviets.

Recently, Stanislav Levchenko, a Soviet spy who defected to the United States in 1979, has alleged that he formerly ran a large network of agents in Japan, referring to the country as a "paradise for spies."