It is a kind of Midamble code sequence detection method and apparatus for TD-SCDMA mobile communication system. It can reach high detection probability and low missing probability under the condition of low signal-to-noise ratio and the under the environment of having frequency diffusion and time diffusion. It can also generate rejection mark and exclude a batch of wrong input incident, such as wrong code set sequence number input, wrong synchronous Information input and local oscillator has large frequency deviation, so to realize the reduction of initializing community research time in TD-SCDMA system. This invention includes the module and steps such as Midamble receives signal sample extraction, Midamble code sequence generation, slide association, delay envelope calculation, multi-frame combination, path selection, similar value calculation, maximum value detection, confidence level calculation and compare, the generation of detection rejection mark, and generation of detection Midamble code sequence number.