Taking the lead in the campaign to deregulate the trucking industry, Sen. Edward M. Kennedy (D-Mass.) announced legislation yesterday to end 31 years of government-sanctioned price fiixing by trucking companies.

Flanked by representatives of the White House and a diverse group of supporters, Kennedy told a news conference that the bill would repeal an exemption from the antitrust laws granted the trucking industry in 1948 over President Truman's veto.

The current exemption allows regulated trucking companies to meet privately to discuss and decide on rates they will charge to all shippers throughout the country. Currently, the rates are formulated by regional rate-setting groups and then submitted to the Interstate Commerce Commission for approval.

"This immunity allows trucking firms to set prices in ways that would be a felony in virtually every other American industry," Kennedy complained. The "legalized price fixing" permitted by the antitrust exemption means higher shipping costs for manufacturers and higher prices for consumers, he said. Kennedy is scheduled to become chairman of the Senate Judiciary Committee.

"We're talking about chicken soup, we're talking about corn flakes, we're talking about canned tomatoes, tuna fish - all the various ingredients which are essential to the consumer and the working people of this nation," Kennedy said.

Appearing with Kennedy, Alfred E. Kahn, President Carter's chief adviser on inflation, called the proposed measure "a step in the right direction.

"I regard it as an important plank in the administration's anti-inflation effort," he said. He drew laughter from the crowd when he added that he was particularly pleased to be in a situation in which, "as a member of the administration, I can publicly applaud Senator Kennedy's efforts."

Backers of the legislation appearing with Kennedy yesterday included Sen. Howard M. Metzenbaum (D-Ohio), who will head the Judiciary Committee's antitrust and monopoly subcommittee; Ralph Nader; and representatives of the National Association of Manufacturers, National Federal of Independent Businesses, Mattel Inc., Tenneco Corp.; the Independent Truckers Association and the Contract Carrier Conference of the Amerlean Trucking Associations. (Contract carriers are truckers who serve a limited number of businesses by contract, not the general public.)

After Kennedy's press conference, C. James McCormick, senior vice president of the American Trucking Associations, issued a blistering attack on the proposal. He accused Kennedy of "misleading the American people" into believing that elimination of collective rate making could save the consumers billions of dollars. (Kennedy had noted that some have estimated that the pricing system costs consumers as much as $2 billion a year.)

"Collective rate making is at the very heart of carrying out the national transportation policy under which we have developed the finest freight transportation system in the world," McCormick said. Without the present system, he contended there would be discrimination, preference and prejudice between communities, regions, shippers and commodities.

McCormick also said he had attended a meeting with Carter and other administration officials yesterday morning at which the President said he had not made up his mind on trucking deregulation.

Although Carter has not taken a position yet on whether to support this session on overall trucking deregulation bill - which would remove restrictions on entry into the business and on the routes truckers may travel - the White House said yesterday that Kahn and the other administration officials who appeared with him at the Kennedy press conferences - Antitrust Chief John H. Shenefield and White House consumer adviser Esther Peterson - were speaking for the administration on the antitrust immunity issue.

Sen. Howard Cannon (D-Nev.), chairman of the Senate Commerce Committee with whom Kennedy teamed to push for airline deregulation last year, indicated yesterday that the Kennedy measure would face a procedure fight as soon as it is introduced. Although Kennedy contends that the measure belongs in the Judiciary Committee and its antitrust panel since it would repeal an antitrust exemption, Cannon contends the bill belongs in his bailiwick.

"Such a bill, irrespective of the manner in which it may be drafted, would go to the very heart of federal regulation of the motor carrier industry and is clearly a matter within the jurisdiction of the (Commerce Committee)," Cannon wrote Senate Majority Leader Robert C. Byrd. He told Byrd he intends to appeal any ruling sending the bill to Kennedy's committee.