This paper describes a method for collecting and analyzing electroencephalography (EEG) data during concurrent transcranial magnetic stimulation (TMS) guided by activations revealed with functional magnetic resonance imaging (fMRI). A method for TMS artifact removal and extraction of event related potentials is described as well as considerations in paradigm design and experimental setup.