The US Civil War was our last war fought with muskets. The Civil War was a transitioning phase to metalic cartridges, that we still use today.
When US Civil War soldiers fired their muskets/rifles there was no spent shell casing to eject from the weapon. Only a lead ball or minie bullet came out of the muzzle (minie bullet was shaped like today's bullet...long missile shaped). Some Spencer repeating rifles were used (the transitioning phase) in which spent copper shell cases were ejected from the weapons.