Du Bois is referring to the historical arc of the black experience in the United States in the nineteenth and early twentieth centuries. In 1863, Abraham Lincoln legally freed the slaves. This is what Du Bois means when he states the slave went free. Further, after the South was defeated in the Civil War in 1865, all black people in the United States achieved literal emancipation.
Then, for a few years after the war, while the former Southern leadership class was broken and in disarray, black folks were able to actually exercise this freedom as if they were whites. This is the period Du Bois refers to when he says that black Americans stood for a brief moment in the sun: they were able to vote; reasonable policies were put in place to help them economically; and in rare instances, black men were even elected to office.
This quickly ended as the white Southern elite regrouped and worked to impose policies that crushed black people and treated them as vastly inferior second-class citizens. As the nineteenth century progressed, black people in the South lost the right to vote; they were terrorized by the Ku Klux Klan, a white supremacist group; subjected to employment agreements that were little better than slavery; and finally, in Plessy v. Ferguson, legally forced into segregation. This is what Du Bois means by black people moving back again toward slavery.
Du Bois made this statement in 1935. For decades, he had been championing black folks' struggle for full civil rights. He disagreed with activists like Booker T. Washington who wanted black folks to accommodate themselves to second-class citizenship in order to make economic gains, arguing that internalizing inferiority enslaves and degrades a person.