Eleven members of the NAACP were arrested on the steps of the South African Embassy yesterday, capping a 29-day, cross-country march against apartheid.

A total of 23 protesters, ranging in age from 15 to 78, began the "March for Human Dignity in South Africa and at Home" on June 1 in Los Angeles and arrived in the District from Fredericksburg, Va., yesterday morning.

The marchers were met a block from the embassy by about 50 delegates to the 77th annual NAACP convention, which opened yesterday in Baltimore. There they gathered around a gray wooden coffin and called for the death of racism in the United States and abroad.

"May the good Lord have mercy on his poor wretched soul and all the other people in Washington who support him," intoned the Rev. William Matthews at the mock funeral.

The march was organized by Joseph Madison, head of the NAACP's national voter education project, as a way to draw attention to the civil rights denied black South Africans.

Along the way, the marchers gathered 14,000 signatures demanding that the Pretoria government grant its black citizens the right to vote. They plan to present the petitions today to Sen. Charles McC. Mathias Jr. (R-Md.) when he addresses the NAACP convention.

The protesters marched through 16 states. According to one protester, the Rev. Tony Minor of Atlanta, a few incidents marred the peaceful nature of the group's trek. In Albuquerque, one marcher was slightly injured when he was hit by a metal chain hurled by a motorist. In downtown Richmond on Friday, two persons attended a rally wearing T-shirts declaring their support for apartheid.

The marchers said they also met hostility in Nash County, N.C., where a man brandishing a shotgun and a rifle tried to stop them from crossing the road in front of his house. Minor said the man was later identified by police as the head of the local chapter of the Ku Klux Klan.

After arriving in Washington, the protesters attended a service at New Bethel Baptist Church, which is headed by Del. Walter E. Fauntroy, and then gathered in Dupont Circle before marching to the embassy.

Fauntroy, who has been arrested at the South African Embassy several times, helped carry a banner on Massachusetts Avenue but did not present himself for arrest yesterday.

Yesterday's demonstration was the third at the embassy since May. More than 3,000 people have been arrested there since November 1984, but since last fall leaders of the Free South Africa movement have aimed their protests primarily at Congress and at American corporations doing business with South Africa.

Minor said the marchers were cheered Saturday when they heard that the Reagan administration had announced its intent to review its policy toward South Africa.

That policy, called "constructive engagement," has been denounced by antiapartheid activists as too mild to persuade South Africa's leadership to abolish apartheid.

"Any positive statement is a good sign," Minor said. "But we want to see Reagan move away from rhetoric and start taking action," such as supporting economic sanctions.

As has been the policy with other demonstrations at the embassy, the protesters who were arrested were booked at the 2nd District police headquarters and released.