Microglia are specialized macrophages of the central nervous system (CNS) and first to react to pathogens or injury. Over the last decade, transcriptional profiling of microglia significantly contributed to our understanding of their functions. In the case of human CNS samples, either potential CNS pathology in the case of surgery samples, or a postmortem delay (PMD) due to the time needed for tissue access and collection, are potential factors that affect gene expression profiles. To determine the effect of PMD on the microglia transcriptome, we first analyzed mouse microglia, where genotype, antemortem conditions and PMD can be controlled. Microglia were isolated from mice after different PMDs (0, 4, 6, 12, and 24 hr) using fluorescence‐activated cell sorting (FACS). The number of viable microglia significantly decreased with increasing PMD, but even after a 12 hr PMD, high‐quality RNA could be obtained. PMD had very limited effect on mouse microglia gene expression, only 50 genes were differentially expressed between different PMDs. These genes were related to mitochondrial, ribosomal, and protein binding functions. In human microglia transcriptomes we previously generated, 31 of the 50 PMD‐associated mouse genes had human homologs, and their relative expression was also affected by PMD. This study provides a set of genes that shows relative expression changes in relation to PMD, both in mouse and human microglia. Although the gene expression changes detected are subtle, these genes need to be accounted for when analyzing microglia transcriptomes generated from samples with variable PMDs.