The lattice dynamics of Ba1-xKxFe2As2 (x = 0.00, 0.27) have been studied by inelastic X-ray scattering measurement at room temperature. K doping induces the softening and broadening of phonon modes in the energy range E = 10-15 meV. Analysis with a Born-von Karman force-constant model indicates that the softening results from reduced interatomic force constants around (Ba,K) sites following the displacement of divalent Ba by monovalent K. The phonon broadening may be explained by the local distortions induced by the K substitution. Extra phonon modes are observed around the wave vector q = (0.5,0,0) at E = 16.5 meV for the x = 0.27 sample. These modes may arise either from the local disorder induced by K doping or from electron-phonon coupling.