We present a complete calculation of the electroweak O(alpha^3 alpha_s) corrections to three-jet production and related event-shape observables at electron--positron colliders. The Z-boson resonance is described within the complex-mass scheme, rendering the calculation valid both in the resonance and off-shell regions. Higher-order initial-state radiation is included in the leading-logarithmic approximation. We properly account for the corrections to the total hadronic cross section and for the experimental photon isolation criteria. To this end we implement contributions of the quark-to-photon fragmentation function both in the slicing and subtraction formalism. The effects of the electroweak corrections on various event-shape distributions and on the three-jet rate are studied. They are typically at the few-per-cent level, and remnants of the radiative return are found even after inclusion of appropriate cuts.