Abstract Purpose In this study, the effect of foam structure on the thermomechanical behaviour of high void ratio porous FGM piezoelectric smart nanoplates is investigated. Method The material of the smart nanoplate consists of PZT-4 on the bottom surface and BaTiO3 on the top surface and is formed by functional grading of these two materials along the thickness of the plate. Four different foam distribution models are modelled to examine the foam structure of the highly porous smart nanoplate, which has become widespread in biosensor applications. For this reason, uniform, symmetrical, top symmetrical and bottom symmetrical foam distribution models are created up to 75% void ratio. To determine the nano size, equations of motion are obtained by using nonlocal strain gradient elasticity and sinusoidal shear deformation theories together, and these equations are solved by the Navier method according to general boundary conditions. Result and Conclusions As a result of the analysis, it is observed that the applied external electric potential creates a softening effect on the plates with the piezoelectric elasticity effect and therefore reduces the thermal buckling temperatures. It is observed that the presence of the foam structure significantly improves the thermal resistance of the material and increases the buckling temperatures. It is also observed that the foam distribution model has significant effects on the thermomechanical behaviour.