The invention provides a method and system for constructing a no-hit-zone bipolar frequency hopping code. The method for constructing the no-hit-zone bipolar frequency hopping code includes the steps that first, a no-hit-zone frequency hopping sequence NHZ is constructed; second, a Walsh sequence is constructed; third, the no-hit-zone frequency hopping sequence NHZ and the Walsh sequence are combined to form the no-hit-zone bipolar frequency hopping code. The method and system for constructing the no-hit-zone bipolar frequency hopping code have the advantages that according to the constructed no-hit-zone bipolar frequency hopping code, all codons are totally orthogonal as long as the delay between users is within a zero correlation zone, so that multi-site interference and beat noise of a two-dimensional coherent OCDMA system will be completely eliminated, and the near-far effect of the two-dimensional coherent OCDMA system can also be eliminated. Therefore, by means of the no-hit-zone bipolar frequency hopping code constructed through the method and system, a high-capacity two-dimensional coherent OCDMA system can be achieved, and the no-hit-zone bipolar frequency hopping code can be applied to an optical access network, an optical local area network, an optical code label switching network, an optical fiber sensor network and the like.