We report on detailed analysis of the hard X-ray and GeV gamma-ray spectra of LS 5039, one of the brightest gamma-ray binary system in the Galaxy. The NuSTAR observation covering its entire orbit in 2016 allowed us for the first time to study the orbital variability of the spectrum above 10 keV. The hard X-ray spectrum is well described with a single power-law component up to 78 keV. The X-ray flux showed a slight deviation from those observed previously with Suzaku in 2007. The fast X-ray brightening observed with Suzaku, around the inferior conjunction, was not observed in this observation. We also analyzed 11 years of Fermi Large Area Telescope data of LS 5039. The GeV spectrum around the inferior conjunction was well described with two non-thermal components; a power law with a photon index of $sim 3$ and a cut-off power law with a cutoff energy of $sim 2$ GeV. The orbital flux variability also changed gradually around a few GeV. These results indicate that there are two emission components in the GeV band, and the dominant component above $sim 1$ GeV does not depend on the orbital phase. By combining these results, we update the spectral energy distribution of LS 5039 with the highest available statistics. Theoretical models proposed so far cannot explain the obtained multi-wavelength spectrum, especially the emission from $sim$ 1 MeV to $sim$ 400 MeV, and we discuss a possibility that particle acceleration in LS 5039 is different from the shock acceleration.