Methylsilsesquioxane films were formed on glass substrates by dropping a sol prepared from methyltriethoxysilane and then heat-treated in an oven. Nanoindentation test was performed to assess the elastoplastic properties of the films, including the relative residual depth ξr, Meyer hardness HM, work-of-indentation WI and the elastic modulus E’. The values of ξr, HM and WI were obtained by a Berkovich indenter and E’ was determined by a spherical indenter on the basis of Hertz elastic theory. ξr decreased with the increase in the heat treatment time, whereas HM , WI and E’ significantly increased with the time. The changes in the mechanical properties with the heat treatment time well reflected the evolution of the Si-O-Si network structure in methylsilsequioxane film.