The thousands of free black men who served in the United States Colored Troops, as they were called, did not escape discrimination just because they were risking their lives serving the Union cause.
Their only involvement in the Knoxville siege and Battle of Fort Sanders was guarding Confederate prisoners in the town’s jail, called Castle Fox—and that was hardly unusual duty for them.
Hollywood’s romantic movie Glory, about a fighting black Union regiment which was decimated at Fort Wagner in South Carolina, hardly depicted the common fare of the USCT.
Some other black units fought, to be sure, but many of them were confined to provost marshal duty (i.e. guarding Rebel prisoners) and all of them were peremptorily denied the right to march with the white soldiers in the Union victory parade in 1865, a few weeks after the Rebel army in Virginia had surrendered.
There had been no slaves in the North (excepting in Delaware) since the early 1800s, but there was still plenty of discrimination against the former ones.
UPDATE: Some USCT troops did march in the Union victory parade, a few weeks after Lee surrendered.