Binary stars plays important role in the evolution of stellar populations . The intrinsic binary fraction ($f_{bin}$) of O and B-type (OB) stars in LAMOST DR5 was investigated in this work. We employed a cross-correlation approach to estimate relative radial velocities for each of the stellar spectra. The algorithm described by cite{2013A&A...550A.107S} was implemented and several simulations were made to assess the performance of the approach. Binary fraction of the OB stars are estimated through comparing the uni-distribution between observations and simulations with the Kolmogorov-Smirnov tests. Simulations show that it is reliable for stars most of whom have $6,7$ and $8$ repeated observations. The uncertainty of orbital parameters of binarity become larger when observational frequencies decrease. By adopting the fixed power exponents of $pi=-0.45$ and $kappa=-1$ for period and mass ratio distributions, respectively, we obtain that $f_{bin}=0.4_{-0.06}^{+0.05}$ for the samples with more than 3 observations. When we consider the full samples with at least 2 observations, the binary fraction turns out to be $0.37_{-0.03}^{+0.03}$. These two results are consistent with each other in $1sigma$.