Optomechanical systems can convert the microwave signal into the optical one, which provides us a candidate to detect weak microwave signal. Employing an optomechanical system, we investigate the effects of the non-Markovian environment on improving the sensitivity of weak microwave signal detection. Our results show that the non-Markovian environment with superohmic spectrum supports the improvement of sensitivity. A comparison between the direct measurement and homodyne detection shows that the latter can enhance the output power spectrum and reduce the additional noise because of the interference.