Nicaraguan President Daniel Ortega appealed to the Security Council today to endorse a World Court opinion calling on the United States to end its support of rebel groups fighting his government.

He also urged President Reagan to reconsider his "immoral policy of state terrorism" and negotiate peace with the leftist Sandinista government.

"We are certainly not prepared to take lessons in international law from Nicaragua," replied U.S. Ambassador Vernon Walters. He said, "Nicaragua will continue to be torn by strife unless and until there is genuine reconciliation" between the Sandinistas and the rebels, known as counterrevolutionaries or contras.

Walters pledged to resume the negotiations with Nicaragua that were broken off in 1984 "if the Sandinistas are now serious about seeking an accord with their neighbors and their own opposition."

The bilateral talks must be "in connection with" the regional peace process and simultaneous with a dialogue among Nicaraguan factions, he said.

Ortega's speech was the centerpiece of his six-day stay in New York, which thus far has featured a series of media interviews and public appearances aimed primarily at American public opinion.

His approach on this trip contrasted with his appearance last October at the U.N.'s 40th birthday celebrations where he carefully crafted a popular image by jogging in Central Park beside a truckload of cameramen, then lost some of his luster when he was reported to have bought $3,500 worth of designer eyeglasses and frames for himself, his wife and daughter. His informal public appearances on this trip have been confined to church groups Sunday and yesterday and a fashionable, but not extravagant, Hunan Chinese restaurant last night.

His objective at the United Nations, where he donned a sober business suit rather than his usual military uniform, appeared to be the mustering of world opinion behind Nicaragua through a resolution endorsing the June 27 decision of the World Court.

The Nicaraguan text is designed to attract maximum support by avoiding any condemnation of Washington and calling only for "immediate and full compliance" with the court's judgment, as well as the resumption of bilateral negotiations.

The United States is expected to veto the resolution. Nicaraguan officials told Third World diplomats today they anticipated such a veto and planned to convene a special session of the General Assembly, where there is no veto power, to approve the resolution.

Although court judgments of this type are theoretically binding, in the view of many legal experts, it is generally understood that neither the court, the council nor the assembly has the means to enforce compliance.

The United States renounced World Court jurisdiction over the case and said it would not accede to the judgment, and Walters said today that Nicaragua had misused the court. The issue is not appropriate to judicial resolution, Walters said, and the court "has fundamentally misperceived the situation in Central America."

Ortega said that the international legal order faces a "mortal blow" if the United States returns to "the law of the jungle."

After two sessions today, the next council meeting was scheduled for Wednesday morning. Nicaraguan sources said they would prefer a vote before Ortega leaves New York on Thursday.