Moiré deflection measurement can be used to calculate refractive index by measuring deflection of probe beam passing through mediums. A moiré deflectometer is designed, which can measure electron density spatial distribution of high-temperature high-density plasma using soft X-ray laser as probe, and a basal demonstration is given.