The famous "algebraic Mayer–Vietoris theorem" is usually stated for complexes over an Abelian category. In the present paper, this theorem is generalized for complexes over a preabelian category. The proofs are based on the technique and results of the relative homological algebra developed by the author earlier.