The electronic, optical and chemical properties of two-dimensional transition metal dichalcogenides strongly depend on their three-dimensional atomic structure and crystal defects. Using Re-doped MoS2 as a model system, here we present scanning atomic electron tomography as a method to determine three-dimensional atomic positions as well as positions of crystal defects such as dopants, vacancies and ripples with a precision down to 4 pm. We measure the three-dimensional bond distortion and local strain tensor induced by single dopants. By directly providing these experimental three-dimensional atomic coordinates to density functional theory, we obtain more accurate electronic band structures than derived from conventional density functional theory calculations that relies on relaxed three-dimensional atomic coordinates. We anticipate that scanning atomic electron tomography not only will be generally applicable to determine the three-dimensional atomic coordinates of two-dimensional materials, but also will enable ab initio calculations to better predict the physical, chemical and electronic properties of these materials.