We propose an algorithm for the binarization of document images degraded by uneven light distribution, based on the Markov Random Field modeling with Maximum A Posteriori probability (MAP-MRF) estimation. While the conventional algorithms use the decision based on the thresholding, the proposed algorithm makes a soft decision based on the probabilistic model. To work with the MAP-MRF framework we formulate an energy function by a likelihood model and a generalized Potts prior model. Then we construct a graph for the energy, and obtain the optimized result by using the well-known graph cut algorithm. Experimental results show that our approach is more robust to various types of images than the previous hard decision approaches.