Spectral unmixing is an effective technique to remotely sensed data exploitation. In this paper, appropriate weights in a local neighborhood are designed to enhance spectral unmixing. The weights integrate the spectral and spatial information, and can effectively segment the homogenous and transition areas between different ground cover types. Based on this region-segmentation, pure-pixel-based end-member extraction algorithms are insensitive to the anomalous pixel, and thus perform more robust. In addition, the weights can be used to regularize non-pure-pixel-based unmixing methods, such as nonnegative matrix factorization (NMF). By incorporating the designed local neighborhood weights, a weighted nonnegative matrix factorization (WNMF) algorithm for spectral unmixing is proposed in this paper. Meanwhile, a multiplicative update rule for WNMF is presented, and the monotonic convergence of the rule is proved. Experiments on synthetic and real hyperspectral data validate the effectiveness of the designed weights.