The selection of ranging codes influences many parameters of the deep space ranging system, such as the ambiguity distance, ranging resolution, acquisition time and hardware implementation, etc. In this paper, several ranging codes commonly used in the deep space ranging system are simulated, analyzed, compared and studied, especially for their spectrum, cycle, DC, ranging clock attenuation, acquisition time and ranging jitter error. The signal space figure method with in-phase/out-phase correlative coefficient is used to analyze the acquisition time. And in-phase/midphase integration loop, as a chip tracking loop, is applied to analyze the ranging jitter error. Also, the influences of acquisition time and ranging jitter error due to sinusoidal pulse shaping and squarewave pulse shaping are analyzed. Through the research and analysis, some results are proposed as that T4B is chosen as ranging code in deep space ranging system, DDS method is selected to create arbitrary chip phase shift, sinusoidal pulse shaping modulation and sinusoidal pulse shaping matched filter scheme are adopted, and in-phase/mid-phase integration loop is applied to track the ranging code.