Natural selection has a critical role in the diversity of morphological traits. However, the genetic basis underlying the evolution and diversity of morphological characteristics, particularly in the context an organism’s behavior, lifestyle, and environment, is not well understood. The discovery of nasal chemoreceptors in mammals provided an opportunity to address this question. Here, we identify 4 nasal chemoreceptor gene families (V1R, V2R, OR, and TAAR) from horse, guinea pig, marmoset and orangutan genome sequences, respectively. Together with previously described mammalian nasal chemoreceptor gene repertoires, we found a significant positive correlation between functional gene number and morphological complexity, both in the main olfactory system and the vomeronasal system. The combined analysis of morphological data, behavioral data, and gene repertoires suggests that nocturnal mammals tend to possess more species-specific chemoreceptor genes and more complicated olfactory organs than diurnal mammals. Moreover, analysis of evolutionary forces revealed the existence of positive selection on the species-specific genes, likely reflecting the species-specific detection of odors and pheromones. Taken together, these results reflect a rare case of adaptation to circadian rhythm activity at the genome scale, and strongly suggest that the complexity of morphological olfactory organs and the diversification of nasal chemoreceptors in nocturnal mammals are under selection for the ability to perceive the variety of odors that nocturnal mammals may encounter in their particular dark environments.