Polarization measurements for the optical counterpart to GRB 021004 are presented and discussed. Our observations were performed with the TNG and the VLT-UT3 (Melipal) during the first and fourth night after the gamma-ray burst discovery. We find robust evidence of temporal evolution of the polarization, which is therefore, at least partially, intrinsic to the optical transient. We do not find convincing evidence of wavelength dependence for the intrinsic polarization of the transient, in agreement with current polarization models for optical afterglows. We discuss the role of dust, both in our galaxy and in the host, in modifying the transmitted polarization vector, showing how a sizable fraction of the observed polarized flux is due to Galactic selective extinction, while it is not possible to single out any clear contribution from dust in the host galaxy. We discuss how our data compare to those obtained by different groups showing that a two-component model is required to describe the complete dataset. This is not surprising given the complex lightcurve of GRB 021004.