Linear and two-dimensional infrared (IR) spectroscopy of site-specific probe molecules provides an opportunity to gain a molecular-level understanding of the local hydrogen-bonding network, conformational dynamics, and long-range electrostatic interactions in condensed-phase and biological systems. A challenge in computation is to determine the time-dependent vibrational frequencies that incorporate explicitly both nuclear quantum effects of vibrational motions and an electronic structural representation of the potential energy surface. In this paper, a nuclear quantum vibrational perturbation (QVP) method is described for efficiently determining the instantaneous vibrational frequency of a chromophore in molecular dynamics simulations. Computational efficiency is achieved through the use of (a) discrete variable representation of the vibrational wave functions, (b) a perturbation theory to evaluate the vibrational energy shifts due to solvent dynamic fluctuations, and (c) a combined QM/MM potential for the systems. It was found that first-order perturbation is sufficiently accurate, enabling time-dependent vibrational frequencies to be obtained on the fly in molecular dynamics. The QVP method is illustrated in the mode-specific linear and 2D-IR spectra of the H–Cl stretching frequency in the HCl–water clusters and the carbonyl stretching vibration of acetone in aqueous solution. To further reduce computational cost, a hybrid strategy was proposed, and it was found that the computed vibrational spectral peak position and line shape are in agreement with experimental results. In addition, it was found that anharmonicity is significant in the H–Cl stretching mode, and hydrogen-bonding interactions further enhance anharmonic effects. The present QVP method complements other computational approaches, including path integral-based molecular dynamics, and represents a major improvement over the electrostatics-based spectroscopic mapping procedures.