We present an investigation of the lattice dynamics of the charge-density-wave compound 2H-NbSe2. We analyze the precise nature of the wave vector dependent electron-phonon coupling (EPC) and derive the bare dispersion of the charge-density-wave (CDW) soft phonon mode using inelastic x-ray scattering combined with ab-initio calculations. Experimentally, phonon modes along the {\Gamma} - M line, i.e. q = (h, 0, 0) with 0 <= h <= 0.5, with the same longitudinal symmetry ({\Sigma}1) as the CDW soft mode were investigated up to 32 meV. In agreement with our calculations we observe significant EPC in the optic modes at h <= 0.2. We analyze the EPC in the optic as well as acoustic modes and show that the q dependences stem from scattering processes between two bands at the Fermi surface both having Nb 4d character. Finally, we demonstrate that the soft mode dispersion at T = 33 K (= {T_{CDW}}) can be well described on the basis of a strongly q dependent EPC matrix element and an acoustic-like bare phonon dispersion in agreement with observations near room temperature.