Militant Communists, in an action coinciding with other traditional socialist May Day activities in the country, spray-painted a protest slogan on the wall outside the office of Attorney General Benjamin Civiletti here yesterday.

And a few blocks north, a group of 75 Maoist demonstrators marched through the riot corridors of black Washington urging the overthrow of the U.S. government.

Two members of the Communist Workers Party slipped through normally tight security at the Justice Department at 10th Street and Pennsylvania Avenue NW and painted the words "Avenge the Murders of the Communist Workers Party 5" on the wall adjacent to Civiletti's office. A banner with the same message was hung from a window on the fifth floor facing Pennsylvania Avenue.

A workers party spokesman said later the action was taken to protest the Justice Department's investigation of a bloody clash last Nov. 3 between party members and the Ku Klux Klan in Greensboro, N.C., where five CWP members were shot and killed. About a dozen demonstrators picketed the Justice Department yesterday, demanding a more thorough investigation.

About the same time, some 75 chanting, shouting followers of the Revolutionary Communist party, a Maoist organization, trudged up and down 14th Street NW and adjacent streets in the Shaw area, calling for "revolution in the 1980s," and urging bystanders to join them.

They got few takers. Closely shepherded by more than 100 D.C. and U.S. Park Police, the marchers shouted "No work, no school, let's put an end to the rich man's rule," while organizers with bullhorns waded into small crowds of curious onlookers and handed out hundreds of party newspapers and leaflets.

Most bystanders looked on passively.

The march, which began at Meridian Hill Park (also known as Malcolm X Park) and meandered through the Shaw area and Howard University for four hours, was almost a carbon copy of the Revolutionary Communist Party May Day march here a year ago -- except that it was much smaller.

A year ago, some 550 marchers participated, many bused in from New York and Chicago. This year, the RCP held several simulataneous May Day marches in other cities and drew only on the Washington-Baltimore area for its marchers here.

The crowd was a mixture of American blacks and whites, plus several Iranians and Arabs. Police put on an extra show of force because of the group's previous confrontation tactics, including a brief but fierce battle with police in January 1979 in front of the White House during the state visit of Chinese Vice Premier Deng Xiaoping.