The expression of a small heat shock protein (sHSP) in plants and its possible function in conditions related to nanomaterial exposure were examined. Multiwalled carbon nanotubes (MWCNTs) and silver nanoparticles (AgNPs) induced toxicity that was indicated by the bending and curling of carrot leaf tissues. Both nanomaterials induced the expression of a small heat shock protein in carrot, DcHsp17.7, but reduced the level of a constitutive heat shock cognate 70. To examine the possible function of DcHsp17.7, the coding gene was heterologously expressed in Escherichia coli. Both nanomaterials reduced the viability of E. coli cell lines. However, the transgenic cell line heterologously expressing DcHsp17.7 showed higher levels of cell viability, compared with vector controls, when exposed to MWCNTs and, more notably, to AgNPs. To the best of our knowledge, this is the first study reporting the influence of nanomaterials on the expression of a plant sHSP and its possible function in conferring tolerance to nanomaterial stress.