A method (300) of performing photon detector autocalibration in quantum key distribution (QKD) system (200) is disclosed. The method (300) includes a first act (302) of performing a detector gate scan to establish the optimum arrival time of a detector gate pulse (S3) that corresponds with a maximum number of photon counts (NMAX) from a single-photon detector (216) in the QKD system (200). Once the optimal detector gate pulse arrival time is determined, then in an act (306), the detector gate scan is terminated and in an act (308) a detector gate dither process is initiated. The detector gate dither act (308) involves varying the arrival time (T) of the detector gate pulse (S3) around the optimal value of the arrival time established during the detector gate scan process. The detector gate dither provides minor adjustments to the arrival time to ensure that the detector (216) produces maximum number of photon counts (NMAX).