Context. Methylamine (CH3NH2) was first detected in the interstellar medium (ISM) toward Sgr B2 almost 50 years ago by observation of rotational transitions in its torsional ground state. Methylamine exhibits two large-amplitude motions (LAMs), the methyl torsion and amine wagging, which complicate the spectral analysis, especially in excited vibration states. The lack of an accurate model of the two coupled LAMs has also hampered the identification in the ISM of rotational transitions in excited vibrational states. Aims. The aim of this work is to study the terahertz and microwave rotational spectra of methylamine experimentally and theoretically in order to provide a reliable basis for the detection of its rotational transitions in the first torsionally excited state, υt = 1, in the ISM. Methods. The terahertz spectrum of methylamine was measured from 150 to 1520 GHz with the Lille fast scan spectrometer. Using a new “hybrid” Hamiltonian model, we were able to analyze the nuclear quadrupole hyperfine structure and to accurately fit the rotational spectrum of the υt = 1 state of methylamine. We used the imaging spectral line survey ReMoCA performed with the Atacama Large Millimeter/submillimeter Array (ALMA) to search for rotational transitions of methylamine in its first torsionally excited state toward the high-mass star forming region Sgr B2(N). The observed spectra are modeled under the assumption of local thermodynamic equilibrium (LTE). Results. Accurate spectral predictions were obtained for the ground and first excited states of CH3NH2. We report the first interstellar detection of methylamine in the υt = 1 state toward the offset position Sgr B2(N1S) in the hot molecular core Sgr B2(N1). The LTE parameters derived previously from the rotational emission of methylamine in its torsional ground state toward Sgr B2(N1S) yield synthetic spectra of methylamine in the υt = 1 state that are fully consistent with the ALMA spectra and allow us to identify five rotational lines of this state.