We report a study of the charmless hadronic decay of the charged $B$ meson to the three-body final state $K^+ K^- pi^+$. The results are based on a data sample that contains $772times10^6$ $B bar{B}$ pairs collected at the $Upsilon(4S)$ resonance with the Belle detector at the KEKB asymmetric-energy $e^+ e^-$ collider. The measured inclusive branching fraction and the direct $CP$ asymmetry are $(5.38pm0.40pm0.35)times 10^{-6}$ and $-0.170pm0.073pm0.017$, respectively, where the first uncertainties are statistical and the second are systematic. The $K^{+}K^{-}$ invariant mass distribution of the signal candidates shows an excess in the region below $1.5$ GeV/$c^2$, which is consistent with the previous studies from BaBar and LHCb. In addition, strong evidence of a large direct $CP$ asymmetry is found in the $K^{+}K^{-}$ low-invariant-mass region.