Accessory gland secretions of male insects have many important functions including the formation of spermatophores. We used light and electron microscopy to investigate the structure of the accessory glands and posterior vasa deferentia of the carabid beetle Pterostichus nigrita to try to determine where spermatophore material is produced. Each accessory gland and posterior vas deferens had an outer layer of longitudinal muscle, beneath which was a layer of connective tissue and a thin band of circular muscle, all of which surrounded a layer of epithelial cells lining the lumen of the ducts. Based on the ultrastructure of the epithelial cells, and their secretory products, we identified two epithelial cell types in each region (distal and proximal) of the accessory glands and four types in the posterior vas deferens. Most secretory products, which stained positively for proteins and some mucins, were released into the lumen of the ducts by apocrine secretion. The accessory glands produced one type of secretory product whereas in posterior vasa deferentia, four types of secretory products were found layered in the lumen. Our results suggest that most of the structural material used to construct a spermatophore is produced by the cells of the posterior vasa deferentia.