Elegy is an important segment of funeral custom in ancient times and is a special genre of mourning literature. Most of the elegies are played by the band in the process of funeral, and those engraved on the stele are very rare. A batch of elegies engraved on the newly excavated epitaph of the Tang Dynasty have been discovered, which possess important reference value as the poetry of the Tang Dynasty. These elegies can be divided into two types: one is excavated on the cover of epitaph; and the other is from the epitaph. These two types of elegies have their uniqueness in terms of the author, the object the author mourned, the content and form. Meanwhile, the elegy of the Tang Dynasty has a very close relationship with the funeral custom and the etiquette custom, and therefore can help us know and understand the funeral custom of the Tang Dynasty. Furthermore, through comparative research on the elegies engraved on the newly excavated epitaph of the Tang Dynasty and the elegies handed down, we can obtain a deeper understanding toward the special literary value and sociocultural significance of elegies.