Coretta Scott King and two of her four children, Bernice, 22, and Martin Luther King III, 27, were arrested at the South African Embassy yesterday as they protested that country's policies of racial segregation.

The King family expected to spend the night in jail, according to Randall Robinson, cochairman of the Free South Africa Movement, which has organized demonstrations in front of the embassy for more than seven months.

More than 2,500 persons have been arrested since the protests began on Thanksgiving eve, but no prosecutions have resulted from these arrests. King's daughter Yolanda was among those previously arrested.

"We decided to submit to arrest today to call attention to the urgent need to pass federal legislation which would establish economic sanctions against the apartheid government of South Africa," said King, widow of slain civil rights leader Dr. Martin Luther King Jr., reading from a prepared statement.

The Kings were among about 40 protesters who chanted antiapartheid slogans as they walked in a circle about a block from the embassy. The demonstrators carried signs calling for an end to South Africa's policy of racial segregation, known as apartheid.

"We came at this time because we feel that it is critically important to bring our attention to the bill that will be before the Senate in July," said King, referring to the Anti-Apartheid Act of 1985.

Shortly before 4:30 p.m., the King family linked arms with Robinson, D.C. Del. Walter Fauntroy and two others. They walked slowly toward a police barricade placed about 500 feet away from the embassy. Only the Kings passed beyond the point of the barricade. A police officer, one of about 15 at the scene, accompanied them as they walked deliberately up to the embassy.

The Kings sang "We Shall Overcome" and swayed as they stood in front of the embassy facing a crowd of reporters and cameramen across the street.

After twice warning the Kings, police made the arrests. Police charged the three with demonstrating within 500 feet of an embassy and failure to disperse.

Coretta King had participated in protests near the embassy on other occasions, but had not previously been arrested, Robinson said. "We thought it more important that she be arrested now than then," he said.

Virginia Democrat Gerald L. Baliles told the Democratic National Committee yesterday that the party "can and should win in the South," but he quickly sought to distance his own race for governor from the liberal image that has hamstrung party candidates there.

"We don't expect everyone in the national party to agree with everything we do or every stand we take" in Virginia, Baliles said, "but we are winning" elections. He urged the party not to become "tied down to worn-out views."

Baliles, speaking before several hundred DNC members at the Omni Shoreham Hotel in the District, said Virgina Democrats are "renewing our party" and that the Democratic ticket's success could help "send a message" and stem the move of some southern Democrats into the Republican Party.

Baliles, a moderate conservative who invoked the popularity of Democratic Gov. Charles S. Robb (who under Virginia law cannot succeed himself), pledged that this year's statewide elections will be "a year of reelection, not realignment." The state Democrats swept all three statewide offices in 1981.

Baliles, who will resign Sunday as state attorney general to devote full time to his campaign, said that under Robb Virginia Democrats have shown they can be fiscally conservative but also "tough on civil rights and tough on criminal wrongs."

Baliles, making his first appearance at the DNC since his nomination earlier this month, was invited to Washington to meet DNC members along with Peter Shapiro, the Democratic nominee for governor in New Jersey, the only other state to hold a gubernatorial election this year.

Baliles said in a news conference that he met with new DNC Chairman Paul G. Kirk Jr. several weeks ago to help plan fundraising and other campaign assistance from the national party.

Kirk dismissed as a "bum rap" attempts by Baliles' Republican opponent, Wyatt B. Durrette, to paint Baliles as a big-spending liberal Democrat more in tune with the national party. "It's a lot of rhetoric," he said.

In what has become a common refrain of his campaign, Baliles praised his running mates for lieutenant governor and attorney general, saying suggestions that their race and sex may hurt the ticket "are unworthy attacks."

State Sen. L. Douglas Wilder of Richmond is seeking to become the first black lieutenant governor and Del. Mary Sue Terry of Patrick County the first woman attorney general.

Baliles, who was the last speaker at the three-day meeting, nearly missed his appearance because his small, private plane developed radio transmission problems after leaving Richmond and had to land in Leesburg, almost an hour's drive from Washington.

Baliles was introduced to the DNC by Virginia Lt. Gov. Richard J. Davis of Portsmouth, the new state party chairman who spent more than $1 million in a losing nomination battle with Baliles this year.