The invention provides an extraction method for mercury compounds in sediments. The extraction method comprises the following steps: adding a complexing agent into the sediments, and carrying out complexing reaction, thereby obtaining complex; and centrifuging, taking out supernatant liquor, adding ion liquid, oscillating, centrifuging, and taking sedimentary facies at the bottom, i.e., extracts containing rich mercury compounds. The extraction method utilizes the ion liquid to extract the mercury compounds in the sediments, so that the extraction effect is good, the enrichment multiple is high, and the extraction method is simple, fast and environmental-friendly. The invention also provides a detection method for the mercury compounds in the sediments. According to the detection method, pretreatment is carried out on the sediments according to the extraction method provided by the invention, and then the obtained extracts are detected by combined use of high-performance liquid chromatography and cold atomic fluorescence spectrometry. The detection method has the advantages of fastness, accuracy, stability, sensitivity and the like and is applicable to daily environmental monitoring.