The Reagan administration is on the verge of granting a special legal immigration status to Nicaraguans in this country who have fled the Marxist Sandinista regime, allowing them to work without fear of deportation, sources said yesterday.

Justice Department sources said Attorney General Edwin Meese III has recommended the controversial move and that the White House is expected to approve it as early as next week.

Rep. John Joseph Moakley (D-Mass.), who has tried for two years -- against administration opposition -- to push through legislation to suspend deportations of Salvadoran and Nicaraguan refugees, called the decision "purely political."

"Once again it shows to me that the administration is playing pure politics with the situation. I'm sure the only reason they're allowing the Nicaraguans to stay is they're coming from a Communist nation and they're not letting the El Salvadorans {stay} because they say that's a democracy. It's a purely political situation," he said in an interview.

Moakley has argued that refugees from Nicaragua and El Salvador could become victims of the guerrilla warfare being waged in their countries. And he charged yesterday that human-rights violations in El Salvador are even worse than those in Nicaragua. "The administration is being very callous," he said.

A month ago, the Reagan administration turned down a plea from El Salvador's president, Jose Napoleon Duarte, that thousands of illegal Salvadoran immigrants not be forced to return to his country. He said that the ailing Salvadoran economy would be further crippled because so many of the refugees send U.S. dollars to their relatives in El Salvador. But the administration feared such a move would imply that the Duarte regime, which it supports, is unstable.

Moakley said the administration's new decision is consistent with its past practice: "They've been very slow in deporting Nicaraguans -- while they're bundling Salavadorans onto airplanes as fast as possible . . . . They think they can treat one country one way and another country another way."

Moakley said he had learned about the decision from a highly placed administration source.

U.S. officials said the administration's decision would give the Nicaraguans a status similar to "extended voluntary departure," a status allowing refugees to stay in the United States indefinitely.

This status has been granted in the past to people fleeing countries such as Poland, Afghanistan and Ethiopia, where they would face persecution, retribution or wartime strife.

The administration has said repeatedly that granting extended voluntary departure status to the Nicaraguan or Salvadoran refugees would draw other refugees like a magnet, some seeking jobs rather than political asylum.

The administration also has said that allowing the special status for refugees from specific countries would undermine immigration-law changes approved by Congress last fall.

That new law allows illegal aliens who arrived in the United States prior to Jan. 1, 1982, to remain. Many of the estimated 150,000 to 200,000 Nicaraguans in this country arrived after that date and are not eligible for legalization.

The Moakley bill is expected to reach the House floor next month.