The silicon nanometer structure grating and the photoresist nanometer structure grating were prepared. A fitting model was built on the new self-developed generalized ellipsometer. Then, the gratings was tested and fitted. Results proved that the machine could work well in nondestructive test of nano grating. Under the condition of the incident angle of 60 and the azimuth angle of 75, the measurement accuracy can be up to 99.97% for the three-dimensional morphology parameters such as key dimension and sidewall angle and so on, and the maximum error is less than 1%. This method is significant for the nondestructive test.