Toll-like receptors (TLRs) play essential roles in innate immunity and increasing evidence indicates that these receptors are expressed in neurons, astrocytes and microglia in the brain where they mediate responses to infection, stress and injury. Very little is known about the roles of TLRs in cognition. To test the hypothesis that TLR4 has a role in hippocampus-dependent spatial learning and memory, we used mice deficient for TLR4 and mice receiving chronic TLR4 antagonist infusion to the lateral ventricles in the brain. We found that developmental TLR4 deficiency enhances spatial reference memory acquisition and memory retention, impairs contextual fear-learning and enhances motor functions, traits that were correlated with CREB up-regulation in the hippocampus. TLR4 antagonist infusion into the cerebral ventricles of adult mice did not affect cognitive behavior, but instead affected anxiety responses. Our findings indicate a developmental role for TLR4 in shaping spatial reference memory, and fear learning and memory. Moreover, we show that central TLR4 inhibition using a TLR4 antagonist has no discernible physiological role in regulating spatial and contextual hippocampus-dependent cognitive behavior.