Feeding drug residue-containing milk to calves is common worldwide and no information is currently available on the impact on the functional profile of the fecal microbiota. Our objective was to characterize the functional profile of the fecal microbiota of preweaned dairy calves fed raw milk with residual concentrations of antimicrobials commonly found in waste milk from birth to weaning. Calves were assigned to a controlled feeding trial being fed milk with no drug residues or milk with antibiotic residues. Fecal samples collected from each calf once a week starting at birth, prior to the first feeding in the trial, until 6 weeks of age. Antibiotic residues resulted in a significant difference in relative abundance of microbial cell functions, especially with genes linked with stress response, regulation and cell signaling, and nitrogen metabolism. These changes could directly impacts selection and dissemination of virulence and antimicrobial. Our data also identified a strong association between age in weeks and abundance of Resistance to Antibiotics and Toxic Compounds. Findings from this study support the hypothesis that drug residues, even at very low concentrations, impact the gut microbiota of calves and result in changes in the functional profile of microbial populations.