Rep. John Moss (D-Calif.), who gained a reputation as a champion of the consumer, a feisty investigator of federal agencies and a crusader against government secrecy, announced yesterday he will retire after 26 years in Congress.

Moss, 62, said he will not seek reelection this year "to have an opportunity to fully recover from the effects of an auto accident," last April in which both he and his wife were injured.

As a member of the Government Operations Committee Moss fathered the "Freedaom of Information: Act," which requires the government to open its files and records to the public.

Moss has fought against what he considers invasions of privacy by the government. He fought to stop a national data bank with information on citizens and the passing back and forth of computer information on individuals among government agencies. He also fought to restrict the government's use of wiretapping.

As chairmanvof the Oversight Subcommittee of the House Commerce Committee, Moss doggedly pursued both federal agencies and private industries. Recent investigations have looked into uranium cartels, oil reserves, pricing and production, and patronage and political appointments by the Civil Service Commission.

Ralph Nader once called him "the best member of the House," As a consumer champion Moss sponsored the Flammable Fabrics Art and the bill setting up the Consumer Product Safety Commission.

While Moss is widely respected as one of the few members of the House who vigorously performed Congress' so-called oversight function, he is also considered somewhat self-righteous and stiff-necked by his colleagues, a reputation that may have kept him cut of House leadership positions.

He is the ranking Democrat on the House of Commerce Committee behind Chairman Harley O. Stanggers of West Virginia, and his retirement will move Rep. John Dingell (D.Mifh.) up into that spot.

Moss is also dean of the 29-member California delegation in the House. His retirement could lead to a fight for that post between a few remaining senior members and the large influx of newer members elected in the last two years.

Moss becomes the 26th House member and 15th Democrat to announce his retirement so far this session. In 1976, 49 House members retired.