The Treasury Department said yesterday that it has made a preliminary determination that the European Community illegally subsidized shipments of 50,000 tons of sugar to the United States over the last week.

The Treasury action comes as U.S. and EC negotiators are trying to reach an agreement on a code for government subsidies of exports, but U.S. trade officials said the quick counter-vailing duty investigation of the sugar imports was not an attempt to put pressure on the EC.

At stake in the case is the European Community's so-called common agricultural policy that sets high internal prices in Europe for domestic farm products and sets high tariffs on imported footstuffs.

Peter Ehrenhaft, deputy assistant secretary of the Treasury for tariff affairs, said a quick Treasury investigation of the shipments showed that the subsidy the exporters received from the EC was larger than the actual sales price of the sugar.

Ehrenhaft said that the sugar was loaded in boats in France and Belgium at 7 cents a pound and that the subsidy the sellers received was 8 cents a pound.

The subsidy is the difference between the internal price the European Community mandates for sugar and export price.

The case is a strange one, both U.S. and European sources said privately. Normally the United States buys no sugar from the European Community. But the shipment involved is a very large one that came in three separate shiploads last week and this week.

Sugar beet growers in Michigan complained to the Treasury about the sugar imports. Ehrenhaft said he did not know the U.S. purchaser of the sugar.

European sources said privately that they cannot explain how the shipments came about and that they already have told U.S. negotiators in Geneva that the shipments were an "aberration."

The Treasury has launched an "expedited" countervailing duty investigation to see if its preliminary assessment of illegal subsidies is correct. U.S. law prohibits foreign governments from subsidizing exports to the United States. If the Treasury determines that such a subsidy has been given, it is required to levy a special countervailing duty equivalent to the subsidy.

If the preliminary Treasury investigation is correct, the countervailing duty would be in the neighborhood of 8 cents a pound.

Total sugar imports from the European Community were $10.9 million last year. The shipments involved this week would be worth about $7 million alone.

U.S. sugar growers have been upset about the low prices they have received for their products and the Carter administration took steps earlier this year to raise sugar prices domestically.