Mammals host diverse bacterial and archaeal symbiont communities (i.e. microbiomes) that play important roles in digestive and immune system functioning, yet cetacean microbiomes remain largely unexplored, in part due to sample collection difficulties. Here, fecal samples from stranded pygmy (Kogia breviceps) and dwarf (K. sima) sperm whales were used to characterize the gut microbiomes of two closely-related species with similar diets. 16S rRNA gene sequencing revealed diverse microbial communities in kogiid whales dominated by Firmicutes and Bacteroidetes. Core symbiont taxa were affiliated with phylogenetic lineages capable of fermentative metabolism and sulfate respiration, indicating potential symbiont contributions to energy acquisition during prey digestion. The diversity and phylum-level composition of kogiid microbiomes differed from those previously reported in toothed whales, which exhibited low diversity communities dominated by Proteobacteria and Actinobacteria. Community structure analyses revealed distinct gut microbiomes in K. breviceps and K. sima, driven by differential relative abundances of shared taxa, and unique microbiomes in kogiid hosts compared to other toothed and baleen whales, driven by differences in symbiont membership. These results provide insight into the diversity, composition and structure of kogiid gut microbiomes and indicate that host identity plays an important role in structuring cetacean microbiomes, even at fine-scale taxonomic levels.