We give the twisted version of N = 2 super-Yang–Mills theory coupled to matter, including quantum fields, supersymmetry transformations, action and algebraic structure. We show that the whole action, coupled to matter, can be written as the variation of a nilpotent operator, modulo field equations. An extended Slavnov–Taylor identity, collecting gauge symmetry and supersymmetry, is written, which allows us to define the web of algebraic constraints, in view of the algebraic renormalization and of the extension of the algebraic proof of the non-renormalization theorems holding for N = 2 SYM theory without matter.