The black soldier fly, Hermetia illucens, is a cosmopolitan insect of the family Stratiomyidae (Diptera). Chemosensory genes encode proteins involved directly in the detection of odorants. In this study, we sequenced the antennal transcriptome of H. illucens adults to identify chemosensory genes. Putative unigenes encoding 27 odorant binding proteins (OBPs), five chemosensory proteins (CSPs), 70 odorant receptors (ORs), 25 ionotropic receptors (IRs), 10 gustatory receptors (GRs) and two sensory neuron membrane proteins (SNMPs) were identified. Tissue-specific expression profiles of the identified OBPs, CSPs and SNMPs were investigated using RT-PCR. Eight OBPs (HillOBP1-2, 9, 11-14, and 17), one CSP (HillCSP5) and one SNMP (HillSNMP1) were predominantly expressed in antennae. Further real-time quantitative PCR analyses revealed that the antennae-enriched unigenes also exhibited significant differences in expression between males and females. Among the sex-biased unigenes, six ORs showed female-biased expression, suggesting that these genes might participate in female-specific behaviors such as oviposition site searching. Sixteen ORs and two OBPs showed male-biased expression, indicating that they may play key roles in the detection of female sex pheromones. Our study is the first attempt to delineate the molecular basis of chemoreception in H. illucens. Our data provide useful information for comparative studies on the differentiation and evolution of Dipteran chemosensory gene families.