Analyzing the brain responses to transcranial magnetic stimulation (TMS) using electroencephalography (EEG) is a promising method for the assessment of functional cortical connectivity and excitability of areas accessible to this stimulation. However, until now it has been difficult to analyze the EEG responses during the several tens of milliseconds immediately following the stimulus due to TMS-induced artifacts. In the present study we show that by combining a specially adapted recording system with software artifact correction it is possible to remove a major part of the artifact and analyze the cortical responses as early as 10 ms after TMS. We used this methodology to examine responses of left and right primary motor cortex (M1) to TMS at different intensities. Based on the artifact-corrected data we propose a model for the cortical activation following M1 stimulation. The model revealed the same basic response sequence for both hemispheres. A large part of the response could be accounted for by two sources: a source close to the stimulation site (peaking approximately 15 ms after the stimulus) and a midline frontal source ipsilateral to the stimulus (peaking approximately 25 ms). In addition the model suggests responses in ipsilateral temporo-parietal junction areas (approximately 35 ms) and ipsilateral (approximately 30 ms) and middle (approximately 50 ms) cerebellum. Statistical analysis revealed significant dependence on stimulation intensity for the ipsilateral midline frontal source. The methodology developed in the present study paves the way for the detailed study of early responses to TMS in a wide variety of brain areas.