Systematic errors are inevitable in most measurements performed in real life because of imperfect measurement devices. Reducing systematic errors is crucial to ensuring the accuracy and reliability of measurement results. To this end, delicate error-compensation designs are often necessary in addition to device calibration to reduce the dependence of the systematic error on the imperfection of the devices. The art of error-compensation designs is well appreciated in nuclear magnetic resonance systems by using composite pulses. In contrast, there are few works on reducing systematic errors in quantum optical systems. Here we propose an error-compensation design applicable to reducing the systematic error in projective measurements on ensembles of both single and multiqubit systems. This design can significantly decrease the systematic error due to dominant error sources in typical optical experiments. In particular, it can reduce the systematic error to the second order of the phase errors of both the half-wave plate (HWP) and the quarter-wave plate as well as the angle error of the HWP. Its power in reducing the systematic error was verified experimentally on qubit state tomography and numerically on two-qubit state tomography. Our study may find applications in high-precision tasks in polarization optics and quantum optics.