Scrambling for the support of black voters as a crucial primary in South Carolina nears, Hillary Clinton and Senator Bernie Sanders of Vermont made appeals on Tuesday to corral their backing. Mrs. Clinton used an address in Harlem to propose $125 billion in new spending to reinvigorate poor and minority communities, and Mr. Sanders barnstormed the South, pledging to combat institutional racism and reform police departments nationwide.

With Mr. Sanders trying to cut into his rival’s long-held advantages among black voters, Mrs. Clinton, her voice growing hoarse, warned her audience, in a reference to Mr. Sanders: “You know, you can’t just show up at election time and say the right things and think that’s enough. We can’t start building relationships a few weeks before a vote.”

The black vote is likely to make up roughly half the Democratic electorate in the party’s Feb. 27 primary in South Carolina, and the two candidates highlighted similar themes in their appeals: the disproportionate economic barriers that young black men, in particular, face and the need to overhaul a criminal justice system that incarcerates young black men at high rates and to work with police forces to prevent officers from shooting black men or singling out African-Americans for arrest.

Mr. Sanders, speaking to students at a town-hall-style meeting at the University of South Carolina in Columbia, said he was tired of seeing “videos of unarmed people being killed by police officers.”