In this paper, the nonlinear dynamic response of functionally graded (FG) sandwich nanobeam associated with temperature-dependent material properties by considering the initial geometric imperfection is investigated. The size-dependent behavior of the FG sandwich nanobeam is simulated based on the nonlocal strain gradient theory, and Von Karman nonlinear hypothesis is used to model the geometrical nonlinearity. Moreover, the geometric imperfection is considered as a slight curvature satisfying the first mode shape, and four different FG sandwich patterns including two asymmetric configurations and two symmetric configurations are taken into account. The governing equation of the FG sandwich nanobeam subjected to thermal and harmonic external excitation loadings is derived on the basis of Hamilton’s principle. The numerical results are obtained by employing the multiple-scale method, which are also validated by comparison with two previous studies. Furthermore, comprehensive investigations into the influences of size-dependent parameters, external temperature variation, geometric imperfection amplitude, gradient index and sandwich configuration on the nonlinear characteristics of imperfect FG sandwich nanobeams are conducted through numerical results.