The moving least-square (MLS) basis is implemented for the real-space band-structure calculation of 2D photonic crystals. A value-periodic MLS shape function is thus proposed in order to represent the periodicity of crystal lattice. Through numerical examples, this MLS method is proved to be a promising scheme for predicting band gaps of photonic crystals. (C) 2003 Optical Society of America.