Single-neuronal studies remain the gold standard for studying brain function. Here we describe a protocol for studying task-related single-neuronal activity in human subjects during neurosurgical procedures involving microelectrode recordings. This protocol has two phases: a preoperative phase and an intraoperative phase. During the preoperative phase, we discuss informed consent, equipment setup and behavioral testing. During the intraoperative phase, we discuss the procedure for microelectrode recordings. Because patients are often awake during these procedures, this protocol can be performed in conjunction with behavioral tasks for studying a variety of cognitive functions. We describe the protocol in detail and provide two examples of expected results. In addition, we discuss the potential difficulties and pitfalls related to intraoperative studies. This protocol takes ∼1.5 h to complete.