The states of Maryland and North Carolina asked a federal appeals court panel yesterday to keep independent presidential candidate John Anderson off their ballots on Nov. 4, saying he remained too long in the Republican presidential contest to comply with their laws.

Both states are seeking to reverse recent federal court rulings that placed Anderson on their ballots over the objections of state election officials. Appeals are also under way in Kentucky and Ohio, where Anderson was placed on the ballot by court order, according to a spokesman for the Anderson campaign.

In Maryland last month, U.S. District Judge Joseph Young ruled that Anderson belonged on the ballot even though he missed the state's March 3 filing deadline for independent presidential candidates. The deadline, Young ruled discriminates against independents since it requires them to declare themselves in Maryland months before the major parties name their candidates.

However, Assistant Attorney General Diana Motz argued before the federal panel in Alexandria that the deadline -- the earliest of any state -- is nondiscriminatory since it requires all candidates to decide by the same date whether to seek the presidency insise or outside the bounds of the major parties.

She argued that the March 3 deadline is not unreasonably early since the "facts of modern political life in America" -- the proliferatioin of primaries, the complexities of campaign financing and other factors -- led all major candidates for the 1980 election to declare their candidacy more than a year in advance.

Motz noted that Libertarian Party candidate Ed Clark met the deadline and will be on the Maryland ballot.

The purpose of the Maryland statute, she said, is to preserve the integrity of the two routes to the ballot -- the independent and major party routes.

"In election year 1980, we're stuck with what we have and with this fact of American life," she said. "Everyone declares a year in advance . . . The only one who doesn't do that is the candidate who wants to change routes in the middle."

Arguing for Anderson, attorney George Frampton Jr., said that the Maryland deadline is discriminatory in Anderson's case. The political nominating process did not sort itself out until after the March 3 deadline, he said. While major party candidates in Maryland "need do nothing until after the nomination," the law required Anderson to file as an independent by March 3, he noted.

If upheld, the law would "100 percent shackle John Anderson and the people who voted for him," Frampton argued.

The judges are not expected to rule in the Maryland case for several weeks.

In the North Carolina case, a lower court ruled that Anderson had technically not participated in that state's primary, so that placing him on the November ballot did not conflict with the state's "sore loser statute," which prohibits losers in party primaries from running as independents.

The state, joined by a group of Democrats, is trying to keep him off the November ballot on the grounds that he did enter the primary as a Republican and did spend money in the state Republican primary although he withdrew before primary election day, May 6.