The invention aims at designing a quantum key distribution network scheme that is easy to construct, enables the cost to be low, has high anti-interference capability, and is capable of realizing communication between any users and overcoming the defect caused by imperfect performances of parts of key devices. The provided scheme has the following advantages: firstly, combination of quantum channels, phase modulators, 90-degree faraday rotator mirrors is used, the birefrigent effect of the optical fiber and the optical device can be compensated automatically, the system stability is enhanced, and the anti-interference capability of the quantum key distribution system is improved; secondly, on the basis of the optical switch control, quantum key sharing between any two users in a network can be realized; thirdly, besides the master control side, each controlled side only needs one phase controller, faraday rotator mirror, and attenuator, so that the networking cost is substantially reduced; and fourthly, the master control side only serves as the auxiliary communication end in the network and will publish modulation information and detection results after communication completion, so that immunity to an attack strategy caused by the imperfect performance of the detector in the actual system can be realized.