Subsea pipeline is the critical component in the offshore systems for transporting oil and gas from resource sites to ports. Its structural failure will be a disaster of heavily polluting the environment leading to unpredictable losses. The mediums inside subsea pipelines are conventionally heated in service for easier transporting after increasing fluidity, resulting in accumulative thermal expansion of the pipeline to induce thermal expansion, triggering upheaval buckling. It is crucial when designing subsea pipelines but always challenging to evaluate rigorously because of the complexities in such consideration. A pipeline might length for miles, while the numerical analysis model using conventional solid finite elements is huge in computational expense, making the successful analysis very time-consuming. This research innovatively develops a new line element, namely the pipeline element, featuring the explicit considerations of soil -pipe interactions and thermal expansion. This element is numerically efficient by eliminating modeling buried soils. The element derivation procedure is elaborated with details, while a Newton-Raphson typed numerical analysis procedure is proposed for nonlinear analysis of pipelines subjected to thermal expansion. An Updated-Lagrangian description is employed for facilitating large deflections. Three groups of examples are provided to demonstrate the numerical robustness of the proposed method. Finally, a case study is given to identify the vital influential factors to the therm al upheaval buckling of pipelines.