The quadrupole coupling constant and asymmetry parameter for the deuteron in liquid heavy water was determined using purely theoretical methods. Molecular-dynamics simulations with the ab initio potential-energy surface of Lie and Clementi were used to generate snapshots of the liquid. The electric-field gradient at the deuteron was then calculated for these configurations and averaged to obtain the liquid quadrupole coupling constant. At 300 K a quadrupole coupling constant of 256 +/- 5 kHz and an asymmetry parameter of 0.164 +/- 0.003 were obtained. The temperature dependence of the quadrupole coupling constant was investigated.