Four top executives of one of France's largest machine-tool makers were arrested earlier this week and charged with selling tens of millions of dollars' worth of sophisticated milling machinery to the Soviet military.

The arrests were confirmed yesterday by the French authorities and American intelligence officials. The American officials said the sales took place over a period of years and continued at least through last year, when the same company, Forest Line, was implicated in the Toshiba scandal. French Give Few Details

While the French authorities gave few details, senior Administration officials said the arrests were not related to the Toshiba Machine Corporation's sale to the Soviet Navy of machinery to make submarine propellers. Rather, they involved a series of other transactions that some American intelligence officials believe included huge machinery that can fabricate fuselages for fighter planes and turbine blades for high-performance jet engines.

Officials said much of the equipment was sent in violation of rules set by Cocom, a coordinating committee of Western allies that makes regulations regarding the export of strategically sensitive goods to the Soviet bloc. However, the French charges concerned espionage, and publicly the authorities made no reference to specific shipments. On the Scale of Toshiba Case

''We are talking about diversions at least on the scale of the Toshiba case and perhaps much larger,'' one Defense Department official said.

The officials said that, just as Japanese officials had been duped by Toshiba Machine, the French authorities had been misled by fraudulent applications for export licenses submitted by Forest Line and its defunct parent company, Machines Francaises Lourdes. The disclosures are particularly embarrassing to France, American officials said, because the French Government owned a big stake in the companies at the time of the sales.

In Washington late yesterday, the French Embassy said that France's counterintelligence service had arrested four executives of the two companies, but did not name them. French news services and newspapers, however, identified two of them as Louis Tardy, former chairman of the bankrupt Machines Francaises Lourdes, and Gen. Jean-Paul Chamouton, a retired air force officer who is a former chairman of Forest Line. Agence France-Presse identified the two others only by their last names, Borgniet and Loboukhine. Implicated Last Year

Forest Line was first implicated in illegal diversions to the Russians last year, in the flurry of investigations prompted by the Toshiba scandal.

Investigators said they had extensive evidence that Forest Line, previously known as Ratier-Forest, delivered five or more five-axis milling machines to the Baltic Shipyard in Leningrad between 1975 and 1979, after Toshiba Machine initially shied away from a deal with the Russians. Later, Toshiba Machine executives, angry at passing up the first deal, shipped their own, far more sophisticated machines to the same shipyard, where submarines are reportedly outfitted with ultra-quiet propellers.

By the time investigators learned of Forest Line's role, the statute of limitations had passed. But the company came under renewed suspicion in October, when the Norwegian police disclosed that Norway's state-owned arms company, Kongsberg Vaapenfabrikk, had shipped more than 140 computer controllers to the Russians, each capable of running one of the precision machine tools. 'It Wouldn't Make Sense'

''Obviously, it wouldn't make sense for the Soviets to buy all those controllers unless they had machine tools to attach them to,'' one Defense Department official said yesterday.

Details of the charges against the four were not released, and American officials said they thought many details would probably be classified. And while American officials were apparently deeply involved in the investigation, they would say little about how the latest shipments of Forest Line equipment were being used by the Russians.

''I'm not sure we even know for sure,'' one investigator said. ''Often, we know what these machines are capable of doing, but not how the Soviets are actually using them.''

Nonetheless, officials said they did not believe that the milling machines - essentially giant lathes weighing up to 10 tons - were being used to produce submarine propellers, as in the earlier cases. Sanctions in the Trade Bill

Some officials suggested that among the uses could be the manufacture of precision turbine blades for jet aircraft, along with the shaping of jet fuselages.

The disclosures come just as the House of Representatives overwhelmingly passed a trade bill that includes sanctions against Toshiba Machine and the Toshiba Corporation, which owns 51 percent of the Japanese machine-tool maker. The parent company has not been directly implicated, and President Reagan has threatened to veto the bill in part because of the Toshiba sanctions.

The bill makes no mention of either of the two French companies, but those concerns would be hard to punish because many of their operations have been divided up and sold in recent months. In November, Machines Francaises Lourdes went bankrupt and was put into the hands of a judicial administrator.

It was unclear exactly why French officials, after months of investigations, chose to move in on the executives this week. They were apparently prompted in part by a visit to Paris last week by Allan Wendt, who runs the State Department's technology transfer office, and Stephen D. Bryen, his Pentagon counterpart.

''There was some evidence the French weren't moving as fast as they needed to be,'' one official said. ''They needed encouragement.''

Photo of two French executives charged with illegally selling sophisticated milling machinery to the Soviet military: Gen Jean-Paul Chamouton and Louis Tardy (Reuters) (pg. 38)