Abstract In this study, numerical methods for the 3D vorticity equation and Euler equation, which preserve the structure of Nambu mechanics for fluid dynamics, are investigated. Discrete vector fields of the stream function (or vector potential), velocity, and vorticity, as well as discrete counterparts of the gradient, curl, and divergence operators acting on them, are defined such that the structure of the de Rham complex in 3D Euclidean space is preserved. The inner products of the discrete vector fields are defined such that discrete counterparts of integration-by-parts formulae for the gradient, curl, and divergence operators hold. In addition, cross products of the discrete vector fields are introduced to define a skew-symmetric trilinear form. A discrete Nambu bracket, as well as the (kinetic) energy, helicity, and enstrophy of the discrete flow field, are defined straightforwardly. They are employed to derive a discrete vorticity equation in the same way as in the continuum setting. A discrete Euler equation is derived from the discrete vorticity equation based on the discrete counterpart of the Poincaré lemma, which holds under some typical conditions. It is proved that any solution to these discretized equations satisfies discrete analogues of the balances of energy, helicity, and enstrophy. Numerical experiments on a periodic array of rolls are conducted to examine the effectiveness of the method.