The invention relates to a 2,3,8,9,14,15-hexa(4-diphenylaminophenyl)-hexa-aza-naphthalene (DTPA-HATN) organic small molecule having a triphenylamine-naphthalene heterocyclic structure and a preparation method thereof, and provides an electrochemical polymerization preparation method of a poly[2,3,8,9,14,15-hexa(4-diphenylaminophenyl)-hexa-aza-naphthalene] polymer film with high contrast (as most as 60%) and good cycling stability. The invention provides an application of the poly[2,3,8,9,14,15-hexa(4-diphenylaminophenyl)-hexa-aza-naphthalene] polymer film as an electrochromic material. According to the invention, electrochemical polymerization preparation is realized, and application in the field of electrochromism is realized.