The presence of an anteroposterior body axis is a fundamental feature of bilateria. Within this group, echinoderms have secondarily evolved pentameral symmetric body plans. Although all echinoderms present bilaterally symmetric larval stages, they dramatically rearrange their body axis and develop a pentaradial body plan during metamorphosis. Therefore, the location of their anteroposterior body axis in adult forms remains a contentious issue. Unlike other echinoderms, sea cucumbers present an obvious anteroposterior axis not rearranged during metamorphosis, thus representing an interesting group to study their anteroposterior axis patterning. Hox genes are known to play a broadly conserved role in anteroposterior axis patterning in deuterostomes. Here, we report the expression patterns of Hox genes from early development to pentactula stage in sea cucumber. In early larval stages, five Hox genes (AjHox1, AjHox7, AjHox8, AjHox11/13a, and AjHox11/13b) were expressed sequentially along the archenteron, suggesting that the role of anteroposterior patterning of the Hox genes is conserved in bilateral larvae of echinoderms. In doliolaria and pentactula stages, eight Hox genes (AjHox1, AjHox5, AjHox7, AjHox8, AjHox9/10, AjHox11/13a, AjHox11/13b, and AjHox11/13c) were expressed sequentially along the digestive tract, following a similar expression pattern to that found in the visceral mesoderm of other bilateria. Unlike other echinoderms, pentameral expression patterns of AjHox genes were not observed in sea cucumber. Altogether, we concluded that AjHox genes are involved in the patterning of the digestive tract in both larvae and metamorphosis of sea cucumbers. In addition, the anteroposterior axis in sea cucumbers might be patterned like that of other bilateria.