During telescope detection, there is atmosphere overflow and other stray light affecting the system which leads to background disturbance. Thus reduce the detection capability of the system. So it is very necessary to design mechanical structure to suppress the stray light for the telescope detection system. It can both improve the signal-to-noise and contrast of the object. This paper designs the optical and mechanical structure of the 400mm telescope. And then the main baffle, baffle vane, field stop and coating technology are used to eliminate the effect of stray light on the optical and mechanical system. Finally, software is used to analyze and simulate stray light on the whole optical and mechanical system. Using PST as the evaluating standard, separate and integrated analysis of the suppressing effect of main baffle, baffle vane and field aperture is completed. And also get the results of PST before and after eliminating the stray light. Meanwhile, the results of stray light analysis can be used to guide the design of the optical and mechanical structure. The analysis results demonstrate that reasonable optical and mechanical structure and stray light suppression measure can highly reduce the PST and also improve the detection capability of the telescope system, and the designed outside baffle, inside baffle, vanes and coating technique etc. can decrease the PST approximately 1 to 3 level.