The dynamic coupling of a vibrating molecular bond to its responsive liquid environment can be described by non-Markovian friction in the framework of the generalized Langevin equation (GLE) and gives rise to line shifts as well as homogeneous and inhomogeneous spectral line broadening. By perturbation theory, we investigate how the interplay of nonharmonic bond-potential contributions and non-Markovian friction determines vibrational line shapes and positions. The accuracy of our perturbation theory is checked by simulations of the GLE. Based on bond potentials and time-dependent friction functions extracted from ab initio molecular dynamics simulations, our analytic theory traces the inhomogeneous line broadening of the infrared OH-stretch band of liquid water back to the coupling of non-Markovian friction to cubic and quartic bond-potential contributions.