Due to the changes of ocean ambient noise,using fixed threshold for line-spectrum detection may easily cause the omission of line-spectrum or misjudgment of spurious peak. According to the change of background noise variance,the automatic threshold is used to better adapt to the change of the background,which makes the line-spectrum detection achieve a better effect. Through the simulation of using fixed threshold and automatic threshold to detect the line-spectrum,the advantages of automatic threshold is validated,and the FPGA is used to realize the algorithm for the automatic threshold line-spectrum detection.