The mouse has become an influential model system for investigating the mammalian nervous system. Technologies in mice enable recording and manipulation of neural circuits during tasks where they respond to sensory stimuli by licking for liquid rewards. Precise monitoring of licking during these tasks provides an accessible metric of sensory-motor processing, particularly when combined with simultaneous neural recordings. There are several challenges in designing and implementing lick detectors during head-fixed neurophysiological experiments in mice. First, mice are small, and licking behaviors are easily perturbed or biased by large sensors. Second, neural recordings during licking are highly sensitive to electrical contact artifacts. Third, submillisecond lick detection latencies are required to generate control signals that manipulate neural activity at appropriate time scales. Here we designed, characterized, and implemented a contactless dual-port device that precisely measures directional licking in head-fixed mice performing visual behavior. We first determined the optimal characteristics of our detector through design iteration and then quantified device performance under ideal conditions. We then tested performance during head-fixed mouse behavior with simultaneous neural recordings in vivo. We finally demonstrate our device’s ability to detect directional licks and generate appropriate control signals in real time to rapidly suppress licking behavior via closed-loop inhibition of neural activity. Our dual-port detector is cost effective and easily replicable, and it should enable a wide variety of applications probing the neural circuit basis of sensory perception, motor action, and learning in normal and transgenic mouse models. NEW & NOTEWORTHY Mice readily learn tasks in which they respond to sensory cues by licking for liquid rewards; tasks that involve multiple licking responses allow study of neural circuits underlying decision making and sensory-motor integration. Here we design, characterize, and implement a novel dual-port lick detector that precisely measures directional licking in head-fixed mice performing visual behavior, enabling simultaneous neural recording and closed-loop manipulation of licking.