The heartworm Dirofilaria immitis is a filarial parasitic nematode infecting dogs and other mammals worldwide causing fatal complications. Here, we present the first large-scale survey of the adult heartworm transcriptome by generation and analysis of 4005 expressed sequence tags, identifying about 1800 genes and expanding the available sequence information for the parasite significantly. Brugia malayi genomic data offered the most valuable information to interpret heartworm genes, with about 70% of D. immitis genes showing significant similarities to the assembly. Comparative genomic analyses revealed both genes common to metazoans or nematodes and genes specific to filarial parasites that may relate to parasitism. Characterization of abundant transcripts suggested important roles for genes involved in energy generation and antioxidant defense in adults. In particular, we proposed that adult heartworm likely adopted an anaerobic electron transfer-based energy generation system distinct from the aerobic pathway utilized by its mammalian host, making it a promising target in developing next generation macrofilaricides and other treatments. Our survey provided novel insights into the D. immitis transcriptome and laid a foundation for further comparative studies on biology, parasitism and evolution within the phylum Nematoda.