Brain surface electrocorticographic (ECoG) recordings can investigate human brain electrophysiology at the cortical surface with exceptionally high signal to noise ratio and spatio-temporal resolution. To be able to use the high spatial resolution of ECoG for accurate brain function mapping and neurophysiology studies, the exact location of the ECoG electrodes on the brain surface should be known. Several issues complicate robust localization: surgical photographs of the electrode array made after implantation are often incomplete because the grids may be moved underneath the skull, beyond the exposed area. Computed tomography (CT) scans made after implantation will clearly localize electrodes, but the effects of surgical intervention may cause the exposed brain to move away from the skull and assume an unpredictable shape (the so-called brain shift). First, we present a method based on a preoperative magnetic resonance imaging (MRI) coregistered with a post-implantation CT scan to localize the electrodes and that automatically corrects for the brain shift by projecting the electrodes to the surface of the cortex. The calculated electrode positions are visualized on the individual subjects brain surface rendering. Second, the method was validated by comparison with surgical photographs, finding a median difference between photographic and calculated electrode centers-of-mass of only 2.6mm, across 6 subjects. Third, to illustrate its utility we demonstrate how functional MRI and ECoG findings in the same subject may be directly compared in a simple motor movement experiment even when electrodes are not visible in the craniotomy.