The rotational spectrum of cyanomethyl formate (HC(O)OCH2C≡N) has been recorded in the 12–123 GHz spectral range. The spectra of two conformers were assigned. The rotamer denoted I has a symmetry plane and two out-of plane hydrogen atoms belonging to the cyanomethyl (CH2CN) moiety. In the conformer called II, the cyanomethyl group is rotated 80.3° out of this plane. Conformer I has an energy that is 1.4(6) kJ/mol lower than the energy of II according to relative intensity measurements. A large number of rotational transitions have been assigned for the ground and vibrationally excited states of the two conformers and accurate spectroscopic constants have been obtained. These constants should predict frequencies of transitions outside the investigated spectral range with a very high degree of precision. It is suggested that cyanomethyl formate is a potential interstellar compound. This suggestion is based on the fact that its congener methyl formate (HC(O)OCH3) exists across a large variety of interstellar environments and the fact that cyanides are very prevalent in the Universe. The experimental work has been augmented by high-level quantum chemical calculations. The CCSD/cc-pVQZ calculations are found to predict structures of the two forms that are very close to the Born–Oppenheimer equilibrium structures. MP2/cc-pVTZ predictions of several vibration–rotation interaction constants were generally found to be rather inaccurate. A gas-phase reaction between methyl formate and the cyanomethyl radical CH2CN to produce a hydrogen atom and cyanomethyl formate was mimicked using MP2/cc-pVTZ calculations. It was found that this reaction is not favored thermodynamically. It is also conjectured that the possible formation of cyanomethyl formate might be catalyzed and take place on interstellar particles.