Multipartite nonlocality is an important measure of multipartite quantum correlations. In this paper, we show that the nonlocal n-site Mermin-Klyshko operator (M) over cap (n) can be exactly expressed as a matrix product operator with a bond dimension D = 2, and then the calculation of nonlocality measure S can be simplified into standard one-dimensional (1D) tensor networks. With the help of this technique, we analyze finite-temperature multipartite nonlocality in several typical 1D spin chains, including an XX model, an XXZ model, and a Kitaev model. For the XX model and the XXZ model, in a finite-temperature region, the logarithm measure of nonlocality (log(2) S) is a linear function of the temperature T, i.e., log(2) S similar to -aT + b. It provides us with an intuitive picture about how thermodynamic fluctuations destroy multipartite nonlocality in 1D quantum chains. Moreover, in the XX model S presents a magnetic-field-induced oscillation at low temperatures. This behavior has a nonlocal nature and cannot be captured by local properties such as the magnetization. Finally, for the Kitaev model, we find that in the limit T -> 0 and N -> infinity the nonlocality measure may be used as an alternative order parameter for the topological-type quantum phase transition in the model.