We perform a study of W-boson production in polarized proton-proton collisions through next-to-next-to-leading order (NNLO) in perturbative QCD. This calculation is required to extend the extraction of polarized parton distribution functions to NNLO accuracy. We present differential distributions at GeV, relevant for comparison to measurements from the Relativistic Heavy Ion Collider (RHIC). The NNLO QCD corrections significantly reduce the scale dependence of the cross section. We compare the longitudinal single-spin asymmetries as a function of lepton pseudorapidity to RHIC data. The asymmetries exhibit excellent stability under perturbative QCD corrections.