Former Mississippi Republican Rep. Jon C. Hinson pleaded no contest in D.C. Superior Court yesterday to a charge of attempted oral sodomy with a Library of Congress employe in a House office building public restroom last February.

Accompanied by his attorney, Hinson, 39, appeared briefly before Judge David L. Norman and said little. Norman sentenced him to 30 days in jail, then suspended the jail time and placed him on one year's probation with the condition that he continue treatment prescribed by a doctor.

This was an apparent reference to "counseling and treatment" that Hinson's aides said the Mississippian began receiving at Sibley Hospital here shortly after he was arrested. They said the treatment was for "disassociative reaction" triggered by the emotional and physical stress of his job in Congress and a recent reelection campaign.

Hinson resigned from Congress on April 13, after Mississippi political leader had called for his ouster in the wake of his arrest.

Hinson and Harold Moore, 29, a Library of Congress laboratory technician, were arrested Feb. 2 in a sixth-floor restroom in the Longworth House Office Building by Capitol Police officers and charged with oral sodomy.

Police, using a vent shaft, had placed the restroom under surveillance following a complaint that the room was being used for sexual purposes.

After their arrests the sodomy charge, which is a felony, was reduced by prosecutors to a misdemeanor charge of attempted sodomy against both Hinson and Moore. This is a routine procedure when the case involves consenting adults.

Moore is scheduled to go to trial Monday before Judge Norman.

Hinson, a staunchly conservative Republican, narrowly was reelected last year to a second term after calling a press conference to acknowledge that he was a survivor of a 1977 fire that killed nine persons at the Cinema Follies, a homosexual theater club in Southeast Washington.

Hinson also acknowledged that he had been accused of committing an "obscene act" on the grounds of the Iwo Jima Memorial in Arlington, another gathering place for some homosexuals.