We establish the necessary and sufficient conditions for those symbols b on the Heisenberg group H n for which the commutator with the Riesz transform is of Schatten class. Our main result generalises classical results of Peller, Janson-Wolff and Rochberg-Semmes, which address the same question in the Euclidean setting. Moreover, the approach that we develop bypasses the use of Fourier analysis, and can be applied to characterise that the commutator is of the Schatten class in other settings beyond Euclidean.