The white millipede Eucondylodesmus elegans Miyosi (Polydesmida: Doratodesmidae) secretes odoriferous droplets from the glands on both lateral surfaces of its body segments. The secretion was shown to be composed of a mixture of (1E)- and (1Z)-2-nitroethenylbenzenes (2-3 µg per millipede), identified by GC/MS analyses and synthesis. This is the first identification of these compounds as natural products. A granulated sugar block baited with the synthetic compound (more than 0.71 µg) demonstrated repellent activity against foraging wild ants, indicating that the compound functioned as a defense substance against potential predators. α,β,2,3,4,5,6-d7-(1E)-2-Nitroethenylbenzene was detected by GC/MS analysis in the millipede secretion after feeding with α,β,β,2,3,4,5,6-d8-L-phenylalanine, indicating that L-phenylalanine is the precursor of these compounds.