The Justice Department is preparing an appeal challenging a district court judge's ruling that the Nixon administration acted unreasonably in telephone wiretaps of Morton Halperin, a former National Security Council aide.

Details of the appeal were not immediately clear yesterday, but attorneys said the federal challenge would attack the "unreasonable" surveillance ruling by U.S. District Court Judge John Lewis Smith Jr.

Smith held last year that Halperin's consitutional rights were violated when the Nixon administration allowed a wiretap to remain on the security aide's home telephone for 21 months.

In August, Smith assessed total damages of $5 against Nixon, his top White House assistant, H.R. Haldeman, and former Attorney General John N. Mitchell.

While Smith's carefully drawn opinion last December did not address the legality of the national security wiretaps, he held that the length of the surveillance was unreasonable and a violation of Halperin's Fourth Amendment rights.

Attorneys for the Justice Department and Halperin differed yesterday on the meaning of the pending appeal, but George Calhoun of the Justice Department said the government will argue that the length of surveillance was reasonable.

"We will not argue the lagality," Calhoun said. "Our concern is on the reasonableness of that conduct. We will argue that the action was reasonable in light of the times" in which the surveillance was carried out.

But Mark Lynch, an American Civil Liberties Union attorney for Halperin, said that such a position would, in effect, be an argument for the legality of long-term wiretaps justified on the ground of threats to national security.

If that is the case, Lynch continued, the Justice Department would be seeking unlimited power to conduct telephone surveillance with as little justification as was proven in the Halperin case.

"The Carter presidential campaign was full of promise that this kind of thing would not be allowed to happen again," Lynch said.

Testimony during the trial last year disclosed that the government obtained no information from the Halperin had been the source of security leaks, as the White House suspected.

Smith said the wiretaps should have been terminated after it became evident through the surveillance that Halperin was not leaking information.