Back then, the African American communities still hasn't fully integrated within the US society and they see world war I as an opportunity to prove their patriotism. Over 2.5 million African American served as military personnel and workers during that time.
But still, they are still not allowed to held any form important military position within the war and often discriminated by other soldiers.