By using the beat frequency technique, the dual-wavelength digital holography (DWDH) can greatly increase the measurement range of the system. However, the beat frequency technique has a limitation in measurement range. The measurement range is not larger than a synthetic wavelength. Here, to break through this limitation, we propose a novel DWDH method based on the constrained underdetermined equations, which consists of three parts: (i) prove that the constrained underdetermined equation has a unique integer solution, (ii) design an algorithm to search for the unique integer solution, (iii) introduce a third wavelength into the DWDH system, and design a corresponding algorithm to enhance the anti-noise performance of DWDH. As far as we know, it is the first time that we have discovered that the problem of DWDH can belong in a problem of contained underdetermined equations, and it is also the first time that we have given the mathematical proof for breaking through the limitation of the measurement range. A series of results is shown to test the theory and the corresponding algorithms. More importantly, since the principle of proposed DWDH is based on basic mathematical principles, it can be further extended to various fields, such as dual-wavelength microwave imaging and dual-wavelength coherent diffraction imaging.