Williams resigned from the 5th Kansas Cavalry in the fall of 1862 to help organize and train the 1st Kansas Colored Infantry Regiment. The unit was raised that August at Fort Scott, Kansas, and he appointed its commander as a state militia colonel. He led his regiment into battle on October 29 during the Skirmish at Island Mound in Bates County, Missouri, the first instance of Union Army colored soldiers in action.