The invention provides an image defogging method based on a dark channel prior and a Markov random field. Aiming at problems that image quality is greatly reduced under a haze environment and a lot of defogging image structure detail information is lost by using an existing algorithm, a single image defogging method combining the dark channel prior (DCP) and the Markov random field (MRF) is provided. The method is characterized by firstly using sub-block portion overlapping local histogram equalization (POSHE) to enhance an original fog image so as to increase a contrast ratio, and through a DCP algorithm, acquiring an optimized transmissivity; using a constraint characteristic of a MRF model to image structure detail information to carry out modeling on the transmissivity so as to further refine the transmissivity; and according to a substantial characteristic of a sky domain, through a partitioning search method, calculating an atmospheric optical value. Compared to a traditional defogging method, by using the method of the invention, an accurate transmissivity image can be acquired, image structure information is effectively maintained, and the defogged image presents abundant details and a real color visual sense effect.