We developed a technique that simultaneously records both electrocorticography and local field potentials in response to nociceptive laser stimuli from freely moving rats. This technique helps establish a direct relationship of electrocortical signals at the mesoscopic and macroscopic levels, which facilitates the investigation of nociceptive information processing in the brain.