A D.C. Superior Court judge ordered officials at Howard University yesterday to reinstate temporarily the campus newspaper editor whose expulsion last week touched off a strong student protest against university President James E. Cheek.

Judge George H. Goodrich issued the temporary restraining order after telling the school's attorney it was "a mighty strange coincidence" that the student, Janice McKnight, was expelled after continuing to give prominent coverage to a sex discrimination complaint against the school despite Cheek's urging that the newspaper stop covering the matter.

Howard officials said McKnight was dismissed from the university because she allegedly misrepresented her academic background on her admissions application in 1979.

Robert L. Watkins, an attorney from the firm of Williams & Connolly who represented the university, said outside court that Howard would continue to fight McKnight's suit and seek to uphold her expulsion.

Goodrich scheduled another hearing in the case Feb. 18, when his order reinstating McKnight both as a student and as editor of The Hilltop newspaper is to expire.

"I'm very, very happy," said McKnight, a 23-year-old senior from Northeast Washington. "It was clear and blatant that there was a connection" between the expulsion and her articles, she said. "Justice did prevail."

But McKnight added that the student protests, which include a demand for Cheek's resignation, should continue.

"What happened to me can happen to somebody else at Howard," she said.

"The court order does not go to the root of the problem . . . . Dr. Cheek is a brilliant man, but he has lost touch with what's good for the students and the black community."

Yesterday, the president of the University Student Association, Howard Newell, repeated his charges that Cheek has curbed free expression by both students and faculty members.

He said Cheek has allowed "mediocrity" and "mismanagement" to flourish at Howard while "closely allying" himself with the Reagan administration, which has supported large federal appropriations for the university.

About 300 students marched in an hour-long protest on campus yesterday, the third day of demonstrations against Cheek since Friday. And last evening, about 125 gathered at the University chapel for a prayer service "to give thanks" for McKnight's reinstatement and to repeat their demands that Cheek resign.

On Monday the university president told demonstrators he would not resign.

McKnight, a journalism major with a 2.9, or B, average, was expelled following a controvery over The Hilltop's coverage of a sex discrimination complaint filed by a male staff attorney against Howard's general counsel, Dorsey Lane.

The attorney, Michael Harris, filed his complaint Nov. 1 with the Equal Employment Opportunity Commission contending that Lane favored female employes in pay and promotion. Lane has declined to return reporters' phone calls seeking his comments on the case.

In late fall The Hilltop gave front-page coverage to the sex discrimination case and in January it published an editorial calling for Lane's dismissal.

Harris was fired from his university post Jan. 31, the same day that Howard officials announced that university trustees had tightened controls over the student newspaper. A day later, McKnight was expelled.

In court yesterday, attorney Watkins said McKnight was expelled after university officials checked her records and discovered she failed to disclose on her admissions application in 1979 that she had attended Syracuse University for a year and had left "in bad standing" academically before applying to Howard.

Her failure to disclose her prior academic record, Watkins said, was grounds for dismissal. He said the university has taken such action in at least three similar cases, in order to "maintain the integrity of the admissions process."

Judge Goodrich, calling the university's position "inflexible," questioned the propriety of expelling McKnight for the admissions infraction after she had completed three years at the school.

John M. Clifford, attorney for McKnight, did not dispute the university's charge, but said Howard had broken its contract with her by not allowing her a formal hearing before expulsion. He cited a statement in the student handbook that "a hearing is . . . guaranteed to any student accused of violating university regulations."

The investigation of McKnight's record, he said, "demonstrates the extraordinary lengths the university has gone to since the editorial appeared."

In his order Judge Goodrich not only reinstated McKnight as a student and as The Hilltop's editor, but ordered the university to "cease and desist from interfering with her exercise of free press rights guaranteed by the . . . United States Constitution."