The invention discloses a single-pixel photon counting spread spectrum compression depth imaging method, which comprises the following steps: S1, sending, by a pseudo-random code generator, based on a programmable logic device, a pseudo-random code to drive a vertical surface laser to emit a light beam; s2, generating a random matrix, and loading the generated random matrix to a digital light projection chip through an electric signal; s3, enabling the light beam emitted by the vertical surface laser to reach the target and receiving, by the receiving system, the returned light beam; s4, acquiring a photon arrival time point value through a single-photon detector and a photon time arrival recorder within a certain integral time; s5, obtaining a measurement vector through an optimal correlation detection method; s6, reconstructing a depth image of the target through a sparse programming inversion method. The problem of range ambiguity of current single-pixel imaging is solved, the receiving signal-to-noise ratio of single-pixel imaging is improved and the modulation frequency is reduced by utilizing an optimal correlation detection method, so that the measurement matrix dimension is reduced, the data storage redundancy is reduced, and the imaging efficiency is improved.