The invention relates to an optical phase-locked loop device based on a direct digital frequency synthesizer and a phase-locking method. The device is composed of a 90-degree optical bridge unit, a balanced detector, a mixer, a programmable logic gate array, a digital-to-analog converter, an analog-to-digital converter, a direct digital synthesizer, a band-pass microwave amplifier, a narrow-line-width tunable laser device, an optical intensity modulator, a fiber grating filter, a fiber beam splitter, and a fiber amplifier. The software uses linear frequency sweeping and Fourier transform to realize the initial entry of the phase-locked loop. With a PID algorithm, precise phase control of the optical phase-locked loop is realized. The device is able to realize high-precision phase locking and large-range frequency shift compensation of the optical phase-locked loop without an auxiliary phase-locked capture circuit. The DDS is used for replacing a voltage-controlled oscillator to realizedirect conversion from the voltage to the phase; and the loop phase margin is improved, the control bandwidth is enhanced, and thus the phase-locked performance of the optical phase-locked loop is improved. Therefore, the optical phase locking and laser coherent communication signal demodulation are realized quickly.