In this paper, we demonstrate a new imaging architecture called time-space united coding spread spectrum single photon counting imaging technique by combining the space coding based single-pixel imaging technology and spread spectrum time coding based scanning imaging technology. This method has the advantages of range ambiguity-free and large time-bandwidth product. Under the interference of noise, this method can accurately restore depth images. In this work, the time-space united correlation nonlinear detection model based on single photon detection, forward imaging model and signal-to-noise ratio model is derived, and the depth image is restored by convex optimization inversion algorithm. The theoretical model and simulation experiments show that compared with the traditional single pixel imaging method based on spatial coding, this method improves the quality of scene reconstruction. Using m-sequence as time coding, imaging has higher noise robustness. In addition, compared with the traditional space coding single pixel imaging technology, the imaging mean square error of the proposed method is reduced by 4/5 and the imaging mean squared error is reduced by 9/10 after introducing the second correlated method. The proposed imaging architecture in this paper may provide a new path for non-scanning lidar imaging methods.