The Interstate Commerce Commission yesterday formally eliminated federal regulation of freight rates for almost all commodities hauled in railroad boxcars because, it said, there is adequate competition to protect shippers from the railroads.

The 3-2 ruling, bitterly opposed by ICC Chairman Reese H. Taylor Jr., represents a significant reduction in railroad regulation because it means railroads can change rates without resorting to involved ICC hearings. Many shippers and most other railroads had opposed the decision.

The ruling was announced without comment March 2, and the railroad industry has been anxiously awaiting the written decision so it could see exactly what the ICC had done. The decision will take effect six months from today, assuming it is not blocked in an inevitable appeal.

The ICC said, in effect, that the trucking industry and parallel railroads provide enough choices for potential boxcar shippers to guarantee that unregulated boxcar rates will not become predatory. "The market itself places an effective ceiling on rail rates for boxcar transportation and regulation is unnecessary . . . ," the majority wrote. Voting for the deregulation were Commissioners Malcolm M.B. Sterrett, Frederic N. Andre and Heather J. Gradison.

Chairman Taylor said the "majority has mandated a step backward by allowing deregulatory zeal to impose an unworkable system on an unwilling public. This is the kind of irresponsibility which can only serve the interests of those who are patiently searching for reasons to justify reregulation . . . . "

Under the decision, ICC regulation of boxcar rates remains only for nonferrous recyclable materials. All other commodities are exempt.