An algorithm is presented that corrects a multichannel fiber-coupled spectrograph for stray or scattered light within the system. The efficacy of the algorithm is evaluated based on a series of validation measurements of sources with different spectral distributions. This is the first application of a scattered-light correction algorithm to a multichannel hyperspectral spectrograph. The algorithm, based on characterization measurements using a tunable laser system, can be extended to correct for finite point-spread response in imaging systems.