Context. Several organic isocyanides (HNC, CH3NC, HCCNC) have been observed to date in the interstellar medium (ISM). However there is still a lack of high-resolution spectroscopic data for simple isocyanides that could provide a basis for their detection. Aims: Diisocyanomethane (CNCH2NC) is a small molecule with only seven atoms that is an interesting candidate for astrophysical detection. The rotational spectrum of diisocyanomethane has never been studied before, hence we present our analysis of its spectrum. Methods: We measured the rotational spectrum of diisocyanomethane in the frequency range 120-620 GHz using the Lille fast-scan and solid-state source spectrometers. The spectroscopic study was supported by high-level theoretical calculations of the molecular structure and both the harmonic and anharmonic force field. Results: The ground and the first excited vibrational state (ν15) are assigned and analysed. The dataset is composed of more than 2000 measured and fitted lines, which allows us to make accurate predictions of transition frequencies of diisocyanomethane in the frequency range up to 900 GHz. The statistical analysis of the results of the fit shows that the use of the S-reduction of the Watson rovibrational Hamiltonian for spectral modelling is more appropriate. Full Tables 2 and 3 are only available at the CDS via anonymous ftp to cdsarc.u-strasbg.fr (130.79.128.5) or via http://cdsarc.u-strasbg.fr/viz-bin/qcat?J/A+A/544/A82