Here we report a scanning tunneling microscopy (STM) and spectroscopy (STS) study in the superconducting state of 2H-NbS2. We directly visualize the existence of incommensurate charge density wave (CDW) that is pinned by atomic impurities. In strong tunneling conditions, the incommensurate CDW is de-pinned from impurities by the electric field from STM tip. We perform STM-based inelastic tunneling spectroscopy (IETS) to detect phonon excitations in 2H-NbS2 and measure the influence of atomic impurities on local phonon excitations. In comparison with the calculated vibrational density of states in 2H-NbS2, we find two branches of phonon excitations which correspond to the vibrations of Nb ions and S ions, and the strength of the local phonon excitations is insensitive to the atomic impurities. Our results demonstrate the coexistence of incommensurate CDW and superconductivity in 2H-NbS2, and open the way of detecting atomic-scale phonon excitations in transition metal dichalcogenides with STM-based IETS.