The invention discloses a quantum key distribution system and method based on time-slot mixed active polarization compensation. The quantum key distribution system comprises a transmitting terminal, an optical signal generation module, a polarization modulator, a synchronous signal generator, a wavelength division multiplexing module, a wavelength division multiplexing solution module, a synchronous signal receiver, a polarization demodulator, a signal detection module and a receiving terminal. According to the quantum key distribution system and method, adopted reference light pulse signals and quantum pulse signals have the same wavelength, the magnitude of single pulse energy of the reference light pulse signals is far larger than the magnitude of single pulse energy of the quantum pulse signals, and the magnitude can be detected through a photoelectric detector. The reference light pulses do not need to be accumulated repeatedly to calculate sums when the detection is carried out, and the polarization compensation rate can be greatly promoted. After the active polarization compensation, and different polarization codes are detected based on a unified polarization detection device, so the quantity of SPAD can be reduced. An optical switch is utilized to carry out switchover on a detection light path, the phenomenon that the strong reference light pulse signals directly impact the SPAD, and therefore communication quality of quantum signals can be guaranteed.