We compute the generation of vorticity from velocity dispersion in the dark matter fluid. For dark matter at zero temperature Helmholtz's theorem dictates that no vorticity is generated and we therefore allow the dark matter fluid to have a non-vanishing velocity dispersion. This implies a modification to the usual hydrodynamical system (continuity and Euler equations): we have to consider the Boltzmann hierarchy up to the second moment. This means that the Euler equation is modified with a source term that describes the effect of non-zero velocity dispersion. We write an equation for the Eulerian vorticity in Lagrangian coordinates and show that it has a growing mode already at second order in perturbation theory. We compute the power spectrum of the vorticity and the rotational velocity at second order in perturbation theory.