In this study we investigated the impact of dietary protein and carotene levels on microbial functions and composition during the last month of purebred fattening Duroc pigs. Fecal microbiota was characterized using 16S ribosomal RNA sequencing at two points of live, 165 (T1) and 195 (T2) days. From 70 to 165 days of age, 32 pigs were divided into two groups fed either a standard-protein (SP) or a low-protein (LP) diet. In the last month (165–195 days), all pigs received a LP diet, either carotene-enriched (CE) or not (NC). Significant differences were observed between T1 and T2 at Amplicon Sequences Variants (ASVs), phylum and genus levels. In T1 group, Prevotella, Faecalibacterium and Treponema were the genera most influenced by dietary protein, together with predicted functions related with the degradation of protein. In contrast, the CE diet did not impact the microbiome diversity, although 160 ASVs were differentially abundant between CE and NC groups at T2. Weak stability of enterotype clusters across time-points was observed as consequence of medium-term dietary interventions. Our results suggest that during the last month of fattening, dietary protein have a stronger effect than carotenes on the modulation of the compositional and functional structure of the pig microbiota.