We discuss a systematic effect associated with measuring polarization with a continuously rotating half-wave plate (HWP). The effect was identified with the data from the E and B Experiment, which was a balloon-borne instrument designed to measure the polarization of the cosmic microwave background (CMB) as well as that from Galactic dust. The data show polarization fractions larger than 10%, while less than 3% were expected from instrumental polarization. We give evidence that the excess polarization is due to detector nonlinearity in the presence of a continuously rotating HWP. The nonlinearity couples intensity signals to polarization. We develop a map-based method to remove the excess polarization. Applying this method to the 150 (250) GHz band data, we find that 81% (92%) of the excess polarization was removed. Characterization and mitigation of this effect are important for future experiments aiming to measure the CMB B-modes with a continuously rotating HWP.