Context. The COMPTEL experunent on CGRO observed the gamma-ray sky at energies from 0.75 MeV to 30 MeV between April 1991 and June 2000. COMPTEL detected many gamma-ray sources, among them an unidentified one labeled GRO J1823-12. It is located near l/b = 17.5 degrees/-0.5 degrees and positionally consistent with the prominent gamma-ray binary LS 5039. Aims. LS 5039 was established as a gamma-ray source at TeV energies by HESS and at GeV energies by Fermi/LAT during recent years, whose gamma-ray radiation is modulated alone its binary orbit. Given this new information we reanalyzed the COMPTEL data of GRO J1823-12 including an orbital-resolved analysis. Methods. We applied the standard methods, proper event selections and data binning with subsequent maximum-likelihood deconvolution, to analyze the COMPTEL data. In addition we developed a tool for selecting and binning the COMPTEL data in a phase-resolved manner. We present the orbit-averaged, as well as orbit-resolved MeV analyses, light curves, and spectra, and put them into a multifrequency context. Results. The COMPTEL data show a significant MeV source, which is positionally consistent with LS 5039, but also with other closeby Fermi/LAT sources. The orbit-resolved analysis provides strong evidence, at about the 3 sigma level, that the MeV flux of GRO J1823-12 is modulated along the binary orbit of about 3.9 days of LS 5039. We show that at MeV energies, the source is brighter at the orbital part around the inferior conjunction than at the part of the superior conjunction, so it is in phase with X-rays and TeV gamma-rays, but in anti-phase with GeV gamma-rays. The high-energy spectral energy distribution (X-rays to TeV gamma-rays) shows the high-energy emission maximiun of LS 5039 at MeV energies. Conclusions. We conclude that the COMPTEL source GRO J1823-12 is the counterpart of the microquasar LS 5039, at least for the majority of its MeV emission. The COMPTEL fluxes, put into multifrequency perspective, provide new constraints on the modeling of the high-energy emission pattern of the gamma-ray binary LS 5039.