Semi-inclusive hadron production processes in deep-inelastic lepton-nucleon scattering are important probes of the quark flavor structure of the nucleon and of the fragmentation dynamics of quarks into hadrons. We compute the full next-to-next-to-leading order QCD corrections to the coefficient functions for semi-inclusive deep-inelastic scattering in analytical form. The numerical impact of these corrections for precision physics is illustrated by a detailed comparison with data on single inclusive hadron spectra from the CERN COMPASS experiment.