In the recent decades, several methods have been developed to extract moving objects in the presence of dynamic background. However, most of them use a global threshold, and ignore the correlation between neighboring pixels. To address these issues, this paper presents a new approach to generate a probability image based on Kernel Density Estimation (KDE) method, and then apply the Maximum A Posteriori in the Markov Random Field (MAP-MRF) based on probability image, so as to generate an energy function, this function will be minimized by the binary graph cut algorithm to detect the moving pixels instead of applying a thresholding step. The proposed method was tested on various video sequences, and the obtained results showed its effectiveness in presence of a dynamic scene, compared to other background subtraction models.