Terahertz waves of which frequency spans from 0.1 to 10 THz bridge the gap between the infrared spectrum and microwaves. Owing to the special features of terahertz wave, such as penetrability and non-ionizing, terahertz imaging technique is a very significant and important method for inspections and detections. Digital holography can reconstruct the amplitude and phase distributions of a sample without scanning and it already has many successful applications in the area of visible and infrared light. The terahertz in-line digital holographic multi-plane imaging system which is presented in this paper is the combination of a continuous-wave terahertz source and the in-line scheme of digital holography. In order to observe a three dimensional (3D) shape sample only a portion of which appears in good focus, the autofocusing algorithm is brought to the data process. The synthetic aperture method is also applied to provide the high resolution imaging effect in the terahertz waveband. Both intrinsic twin images and defocused objective images confuse the quality of the image in an individual reconstructed plane. In order to solve this issue, phase retrieval iteration algorithm is used for the reconstruction. In addition, the reconstructed amplitude image in each plane multiplies the mask of which the threshold depends on the values of the autofocusing curve. A sample with simple artificial structure is observed which verifies that the present method is an authentic tool to acquire the multi-plane information of a target in terahertz waves. It can expect a wide application in terahertz defect detecting, terahertz medical inspection and other important areas in the future.