The Senate Judiciary Committee completed action yesterday on a proposed new criminal code, agreeing on a compromise that angered the Moral Majority on one side and the American Civil Liberties Union on the other.

Two conservative Republican members of the committee, Jeremiah Denton (Ala.) and John East (N.C.), withdrew as sponsors of the legislation after a committee majority refused to go along with a number of proposed amendments, including one for a federal death penalty.

The proposed code, adopted 11 to 5, would virtually abolish parole, provide for preventive detention before trial and set up uniform sentencing guidelines.

Chairman Strom Thurmond (R-S.C.) went along with requests not to include many of the more controversial items--including the death penalty, a relaxation of federal gun control laws and a stiffer labor violence law--for fear that they would trigger filibusters that would insure the death of the bill.

But he said he supports many of them personally and promised that each will be dealt with in separate legislation.

Even with these subjects omitted, the bill has drawn opposition from the American Civil Liberties Union, which warns that it would trample individual rights, and from the Moral Majority, which says the bill is too soft on crime.

David Landau of the ACLU said his group opposes the sentencing provisions, which it says will result "in substantially longer terms of imprisonment;" provisions that would allow the government to appeal sentences it considers too lenient; the tougher obscenity laws, and provisions for detention without bail that the ACLU considers unconstitutional.

The Moral Majority has charged that the code will provide shorter sentences for convicted criminals. That opposition is centered on a proposal to reduce maximum jail terms across the board in combination with the provision that would virtually end chances for parole except for a possible 10 percent reduction for good behavior.

The Moral Majority also objected to a provision that would end inter-spousal immunity in rape cases. Such immunity means that a wife cannot charge a husband with rape, regardless of the circumstances.

"Dammit, when you get married, you kind of expect you're going to get a little sex," said Denton, who introduced an unsuccessful amendment to retain the husband-wife immunity.

Conservatives on the committee did win approval for some amendments sought by the Moral Majority, especially in the area of obscenity laws, broader definitions for rape and longer terms of imprisonment for rape.

They also won on a provision to provide maximum six-year state sentences for offenses including incest, bigamy and "consensual sexual offenses" that occur on "federal enclaves" such as military installations or Indian reservations.