OBJECTIVE: Clinical investigators have hypothesized that interictal epileptiform discharges (IEDs) generated by hypothalamic hamartoma (HH) lead to cognitive dysfunction in patients with drug-resistant gelastic seizures. Herein we provide causal evidence supporting this hypothesis by demonstrating that excitatory neural bursts, when propagating from the HH to the mediodorsal thalamus during the encoding period, impair working memory. METHODS: By employing channelrhodopsin-2 photostimulation, we induced excessive neural excitation in Long-Evans rats, resembling IEDs, at the axon terminals of the lateral hypothalamus projecting toward the mediodorsal thalamus and prelimbic cortex. We recorded local field potentials (LFPs) at these sites and assessed the performance of working memory tasks with and without photostimulation. Utilizing support vector machine analysis on LFP trials under sham photostimulation, we identified the neural correlates of successful task performance. Through mixed model analyses, we evaluated the impacts of photostimulation timing and the alteration in LFP amplitude induced by photostimulation on task performance. RESULTS: Ten rats completed operant conditioning using a spout lever system after receiving an average of 70.7 days of training, at a rate of 135.2 trials per day. During sham photostimulation, successful trials were associated with a shorter duration of the working memory maintenance period, as well as an augmentation in the 10- to 14-Hz LFP amplitude at the mediodorsal thalamus and prelimbic cortex during the memory encoding phase. Photostimulation at the mediodorsal thalamus during encoding reduced the odds of a trial being successful by 0.19. Conversely, excessive mediodorsal thalamus LFP augmentation induced by photostimulation during encoding increased the odds of a trial being unsuccessful by 1.04. SIGNIFICANCE: Excessive neural excitation, specifically propagating from the lateral hypothalamus to the mediodorsal thalamus during encoding, alters physiological neural activity and transiently impairs working memory. This study clarifies the pathophysiological mechanism underlying cognitive disabilities associated with working memory impairment in HH-related epileptic encephalopathy.