This paper proposes an edge-constrained Markov random field (EC-MRF) method for accurate land cover classification over urban areas using hyperspectral image and LiDAR data. EC-MRF adopts a probabilistic support vector machine for pixel-wise classification of hyperspectral and LiDAR data, while MRF performs as a postprocessing regularizer for spatial smoothness. LiDAR data improve both pixel-wise classification and postprocessing result during an EC-MRF procedure. A variable weighting coefficient, constrained by a combined edge extracted from both hyperspectral and LiDAR data, is introduced for the MRF regularizer to avoid oversmoothness and to preserve class boundaries. The EC-MRF approach is evaluated using synthetic and real data, and results indicate that it is more effective than four similar advanced methods for the classification of hyperspectral and LiDAR data.