The morphology and ultrastructure of the olfactory sensilla on the antennae and maxillary palps were investigated through scanning electron microscopy (SEM) and transmission electron microscopy (TEM), and their responses to five volatile compounds were measured using electroantenogram (EAG) and electropalpogram (EPG) techniques in the pumpkin fruit fly, Bactrocera depressa (Shiraki; Diptera: Tephritidae). Male and female B. depressa displayed distinct morphological types of olfactory sensilla in the antennae and maxillary palps, with predominant populations of trichoid, basiconic, and coeloconic sensilla. Basiconic sensilla, the most abundant type of olfactory sensilla in the antennae, could be further classified into two different types. In contrast, the maxillary palps exhibited predominant populations of a single type of curved basiconic sensilla. High‐resolution SEM observation revealed the presence of multiple nanoscale wall‐pores on the cuticular surface of trichoid and basiconic sensilla, indicating that their primary function is olfactory. In contrast, coeloconic sensilla displayed several longitudinal grooves around the sensillum peg. The TEM observation of individual antennal olfactory sensilla indicates that the basiconic sensilla are thin‐walled, while the trichoid sensilla are thick‐walled. The profile of EAG responses of male B. depressa was different from their EPG response profile, indicating that the olfactory function of maxillary palps is different from that of antennae in this species. The structural and functional variation in the olfactory sensilla between antennae and maxillary palps suggests that each plays an independent role in the perception of olfactory signals in B. depressa.