Because of the conversion of elastic energy into heat, seismic waves are attenuated and dispersed as they propagate. The attenuation effects can reduce the resolution of velocity models obtained from waveform inversion or even cause the inversion to produce incorrect results. Using a viscoacoustic model consisting of a single standard linear solid, we discovered a theoretical framework of viscoacoustic waveform inversion in the time domain for velocity estimation. We derived and found the viscoacoustic wave equations for forward modeling and their adjoint to compensate for the attenuation effects in viscoacoustic waveform inversion. The wave equations were numerically solved by high-order finite-difference methods on centered grids to extrapolate seismic wavefields. The finite-difference methods were implemented satisfying stability conditions, which are also presented. Numerical examples proved that the forward viscoacoustic wave equation can simulate attenuative behaviors very well in amplitude attenuation and phase dispersion. We tested acoustic and viscoacoustic waveform inversions with a modified Marmousi model and a 3D field data set from the deep-water Gulf of Mexico for comparison. The tests with the modified Marmousi model illustrated that the seismic attenuation can have large effects on waveform inversion and that choosing the most suitable inversion method was important to obtain the best inversion results for a specific seismic data volume. The tests with the field data set indicated that the inverted velocity models determined from the acoustic and viscoacoustic inversions were helpful to improve images and offset gathers obtained from migration. Compared to the acoustic inversion, viscoacoustic inversion is a realistic approach for real earth materials because the attenuation effects are compensated.