The hippocampus and medial entorhinal cortex (MEC) form a cognitive map that facilitates spatial navigation. As part of this map, MEC grid cells fire in a repeating hexagonal pattern across an environment. This grid pattern relies on inputs from the medial septum (MS). The MS, and specifically its GABAergic neurons, are essential for theta rhythm oscillations in the entorhinal-hippocampal network, however, it is unknown if this subpopulation is also essential for grid cell function. To investigate this, we used optogenetics to inhibit MS-GABAergic neurons during grid cell recordings. We found that MS-GABAergic inhibition disrupted grid cell spatial periodicity both during optogenetic inhibition and during short 30-second recovery periods. Longer recovery periods of 60 seconds between the optogenetic inhibition periods allowed for the recovery of grid cell spatial firing. Grid cell temporal coding was also disrupted, as observed by a significant attenuation of theta phase precession. Together, these results demonstrate that MS-GABAergic neurons are critical for grid cell spatial and temporal coding in the MEC.