The invention relates to a digital detection and error correction algorithm for FSK modulation system, which includes the following steps: the first step: extracting the original phase information from the received data; the second step: performing signal detection to obtain the received signal; the second step Step 3: Calculate new phase information; Step 4: Compare and make difference to obtain differential phase information; Step 5: Delay difference to obtain the difference of differential phase information; Step 6: Determine whether the difference of differential phase information exceeds the first Threshold, if it is, enter the error correction state, otherwise continue to judge; the seventh step: in the error correction state, judge whether the influence of the error bit is over, if it is, obtain the receiving error pattern, if not, then continue to judge; the eighth step: set The received error pattern is compared with the known error pattern to determine the position of the error bit. The error correction method of the invention has better ability to resist residual frequency deviation, improves error correction performance, and ensures high precision of detection results.