We report on a ∼5σ detection of polarized 3–6 keV X-ray emission from the supernova remnant Cassiopeia A (Cas A) with the Imaging X-ray Polarimetry Explorer (IXPE). The overall polarization degree of 1.8% ± 0.3% is detected by summing over a large region, assuming circular symmetry for the polarization vectors. The measurements imply an average polarization degree for the synchrotron component of ∼2.5%, and close to 5% for the X-ray synchrotron-dominated forward shock region. These numbers are based on an assessment of the thermal and nonthermal radiation contributions, for which we used a detailed spatial-spectral model based on Chandra X-ray data. A pixel-by-pixel search for polarization provides a few tentative detections from discrete regions at the ∼ 3σ confidence level. Given the number of pixels, the significance is insufficient to claim a detection for individual pixels, but implies considerable turbulence on scales smaller than the angular resolution. Cas A’s X-ray continuum emission is dominated by synchrotron radiation from regions within ≲1017 cm of the forward and reverse shocks. We find that (i) the measured polarization angle corresponds to a radially oriented magnetic field, similar to what has been inferred from radio observations; (ii) the X-ray polarization degree is lower than in the radio band (∼5%). Since shock compression should impose a tangential magnetic-field structure, the IXPE results imply that magnetic fields are reoriented within ∼1017 cm of the shock. If the magnetic-field alignment is due to locally enhanced acceleration near quasi-parallel shocks, the preferred X-ray polarization angle suggests a size of 3 × 1016 cm for cells with radial magnetic fields.