The United States announced yesterday that it intended to punish the Soviet Union for violating international whaling law, although it has refused to penalize Japan for similar infractions.

According to Commerce Secretary Malcolm Baldrige, Soviet whaling fleets exceeded their quota of Southern Hemisphere minke whales by about 500 animals this year, triggering automatic sanctions under U.S. fishery law.

Baldrige immediately moved to halve the Soviet fishing limit for U.S. waters, as the law requires.

Although the Soviet Union takes a relatively small amount of fish from U.S. waters, the decision sets the stage for a second, more costly penalty. At President Reagan's discretion, the United States may also prohibit the importation of Soviet fishery products.

Commerce spokesman A. Joseph LaCovey said the Soviet Union ships fish products worth $17 million to the United States each year, mostly frozen crab processed under joint ventures with U.S. firms.

Whaling quotas are set by the International Whaling Commission, a multinational body set up almost 40 years ago to protect the diminishing whale population. Because the commission has no enforcement authority, however, Congress added a provision to U.S. law in 1979 calling for automatic sanctions against any nation violating established quotas.

The provision was at the center of a heated battle between the Reagan administration and conservationists last year, when Japanese fleets set out to hunt sperm whales. The whaling commission has banned the taking of sperm whales.

Although Japan had filed a legal objection to the ban and thus was exempt from it under the whaling commission's rules, conservationists argued that mandatory U.S. sanctions still applied. The administration declined to impose sanctions, however, and is appealing a federal court ruling in favor of the conservationists.

"The Japanese came to us and we sat down and reasoned together," LaCovey said. "The Soviets made no effort to sit down and discuss the problem."

According to LaCovey, the administration agreed not to penalize the Japanese for taking sperm whales through 1986 if the Japanese would withdraw their formal objections to a ban on commercial whaling starting in 1987.

Japanese officials have strongly denied making any such agreement, however, and the deadline for withdrawing their objection to the commercial whaling ban passed last Monday without any action.