The globular clusters are probably good targets for dark matter (DM) searches in $\gamma$-rays due to the possible adiabatic contraction of DM by baryons. In this work we analyse the three-year data collected by {\it Fermi} Large Area Telescope of globular clusters NGC 6388 and M 15 to search for possible DM signals. For NGC 6388 the detection of $\gamma$-ray emission was reported by {\it Fermi} collaboration, which is consistent with the emission of a population of millisecond pulsars. The spectral shape of NGC 6388 is also shown to be consistent with a DM contribution if assuming the annihilation final state is $b\bar{b}$. No significant $\gamma$-ray emission from M 15 is observed. We give the upper limits of DM contribution to $\gamma$-ray emission in both NGC 6388 and M 15, for annihilation final states $b\bar{b}$, $W^+W^-$, $\mu^+\mu^-$, $\tau^+\tau^-$ and monochromatic line. The constraints are stronger than that derived from observation of dwarf galaxies by {\it Fermi}.