The mercury concentration in the coals from Datong and Xiaoyi, Shanxi has been measured to study the relationship between mercury enrichment in coal and coalseam depth. Ten samples were researched, of which 7 coal and rock samples from the main coalseam and the places around it were collected at a miner in Datong city, and 3 coal samples from three coalseams at a miner in Xiaoyi city. The mercury concentration in the coal and rock samples was measured with US EPA Method7471, which is a standard method recommended by the US EPA. The results show that the mercury enrichment in coal is higher than that in rock in the same conditions, and the mercury concentration in the longer-buried coal is higher than that of the shorter-buried. However, the mercury concentration in coal with depth has no definite linear correlation, varying in different coal fields.