Abstract It is believed that massive galaxies have quenched their star formation because of active galactic nucleus feedback. However, recent studies have shown that some massive galaxies are still forming stars. We analyze the morphology of star formation regions for galaxies of stellar masses larger than 1011.3 M ⊙ at around redshift z r = 0.5 using u − z color images. We find that about 20% of the massive galaxies are star-forming (SF) galaxies, and most of them (∼85%) have asymmetric structures induced by recent mergers. Moreover, for these asymmetric galaxies, we find that the asymmetry of the SF regions becomes larger for bluer galaxies. Using the Illustris simulation, we can qualitatively reproduce the observed relation between asymmetry parameter and color. Furthermore, using the merger trees in the simulation, we find a correlation between the color of the main branch galaxies at z r = 0.5 and the sum of the star formation rates of the recently accreted galaxies, which implies that star formation of the accreted galaxies has contributed to the observed star formation of the massive (host) galaxies (ex situ star formation). Furthermore, we find two blue and symmetric galaxies, candidates for massive blue disks, in our observed sample, which indicates that about ∼10% of massive SF galaxies are forming stars in the normal mode of disk star formation (in situ star formation). With the simulation, we find that the disk galaxies at z r ≈ 0.5 should have experienced few major mergers during the last 4.3 Gyr.