Here we present a draft genome sequence of the nematode Pristionchus pacificus, a species that is associated with beetles and is used as a model system in evolutionary biology. With 169 Mb and 23,500 predicted protein-coding genes, the P. pacificus genome is larger than those of Caenorhabditis elegans and the human parasite Brugia malayi. Compared to C. elegans, the P. pacificus genome has more genes encoding cytochrome P450 enzymes, glucosyltransferases, sulfotransferases and ABC transporters, many of which were experimentally validated. The P. pacificus genome contains genes encoding cellulase and diapausin, and cellulase activity is found in P. pacificus secretions, indicating that cellulases can be found in nematodes beyond plant parasites. The relatively higher number of detoxification and degradation enzymes in P. pacificus is consistent with its necromenic lifestyle and might represent a preadaptation for parasitism. Thus, comparative genomics analysis of three ecologically distinct nematodes offers a unique opportunity to investigate the association between genome structure and lifestyle.