Human milk (HM) feedings are associated with reduced risks of neurodevelopmental and neurocognitive delays and systemic inflammatory diseases in infants born prematurely and/or at a low birth weight. Utilizing a neonatal piglet model, HM feedings were compared to bovine milk-derived infant formula (IF)-feedings with the aim of understanding the underlying mechanisms involved in reducing these risks. Six male piglets at postnatal-day (PD)2 were randomized into two feeding groups: HM-fed (n = 3) or IF-fed (n = 3) for 28 days. At 3- and 4-weeks-old, piglet memory and learning performance were assessed using novel object recognition (NOR). At PD30 piglets were euthanized, and whole brains were excised, weighed, and preserved for further analyses, and brain microglial morphology, and systemic inflammatory cytokines were quantified. During NOR, HM-fed piglets had significantly more non-novel revisits at both 3- and 4-weeks-old compared to IF-fed piglets. Microglia of HM-fed piglets had longer processes, more branch points, more endpoints, and a larger territorial volume compared to IF-fed piglets at PD30. In a neonatal piglet model, HM-feedings may improve cognition and reduce brain inflammatory response compared to IF-feedings.