We present HST NIC2 morphologies of a spectroscopic sample of massive galaxies at z~2.3, by extending our sample of nine compact quiescent galaxies (r_e~0.9 kpc) with ten massive emission-line galaxies. The emission-line galaxies are classified by the nature of their ionized emission; there are six star-forming galaxies and four galaxies hosting an active galactic nucleus (AGN). The star-forming galaxies are the largest among the emission-line galaxies, with a median size of r_e=2.8 kpc. The three galaxies with the highest star formation rates (>~ 100 Msol / yr) have irregular and clumpy morphologies. The AGN host galaxies are more similar to the compact quiescent galaxies in terms of their structures (r_e~1.1 kpc) and spectral energy distributions. The total sample clearly separates into two classes in a color-mass diagram: the large star-forming galaxies that form the blue cloud, and the compact quiescent galaxies on the red sequence. However, it is unclear how or even if the two classes are evolutionary related. Three out of six massive star-forming galaxies have dense cores and thus may passively evolve into compact galaxies due to fading of outer star-forming regions. For these galaxies a reverse scenario, in which compact galaxies grow inside-out by star formation is also plausible. We do caution though that the sample is small. Nonetheless, it is evident that a Hubble sequence of massive galaxies with strongly correlated galaxy properties is already in place at z>2.