In this work, we designed a MEMS device which allows simultaneous direct measurement of mechanical properties during deformation under external stress and characterization of the evolution of microstructure of nanomaterials within a transmission electron microscope. This MEMS device makes it easy to establish the correlation between microstructure and mechanical properties of nanomaterials. The device uses piezoresistive sensors to qualitatively measure the force and displacement of nanomaterials, e.g., in wire and thin plate forms. The device has a theoretical displacement resolution of 0.19 nm and a force resolution of 2.1 μN. The device has a theoretical displacement range limit of 2.74 μm and a load range limit of 27.75 mN.