Musical improvisation offers an excellent experimental paradigm for the study of real-time human creativity. It involves moment-to-moment decision-making, monitoring of one's performance, and utilizing external feedback to spontaneously create new melodies or variations on a melody. Recent neuroimaging studies have begun to study the brain activity during musical improvisation, aiming to unlock the mystery of human creativity. What brain resources come together and how these are utilized during musical improvisation are not well understood. To help answer these questions, we recorded electroencephalography (EEG) signals from 19 experienced musicians while they played or imagined short isochronous learned melodies and improvised on those learned melodies. These four conditions (Play-Prelearned, Play-Improvised, Imagine-Prelearned, Imagine-Improvised) were randomly interspersed in a total of 300 trials per participant. From the sensor-level EEG, we found that there were power differences in the alpha (8-12 Hz) and beta (13-30 Hz) bands in separate clusters of frontal, parietal, temporal, and occipital electrodes. Using EEG source localization and dipole modeling methods for task-related signals, we identified the locations and network activities of five sources: the left superior frontal gyrus (L SFG), supplementary motor area (SMA), left inferior parietal lobule (L IPL), right dorsolateral prefrontal cortex, and right superior temporal gyrus. During improvisation, the network activity between L SFG, SMA, and L IPL was significantly less than during the prelearned conditions. Our results support the general idea that attenuated cognitive control facilitates the production of creative output.