Modelling of molecular emission spectra from interstellar clouds requires the calculation of rate coefficients for excitation by collisions with the most abundant species. Among the interstellar molecules, the CN radical is of particular interest since it is a good probe of dense region and can be used as a tracer of magnetic fields. We calculate fine- and hyperfine-structure-resolved excitation rate coefficients of CN(X2Σ+) by H2(j= 0), the most abundant collisional partner in the interstellar medium. The calculations are based on a new potential energy surface obtained from highly correlated ab initio calculations. State-to-state rate coefficients between the first fine and hyperfine levels of CN were calculated for low temperatures ranging from 5 to 100 K. The new results are compared to the CN–He rate coefficients. Significant differences are found between the two sets of rate coefficients. This comparison shows that the CN–H2 rate coefficients have to be used for observation interpretations and we expect that their use will significantly help the astronomers in the interpretation of the CN emission lines observed with current and future telescopes.