Stellar archeology [ 1 ] shows that massive elliptical galaxies today formed rapidly about ten billion years ago with star formation rates above several hundreds solar masses per year ( M _ { \mathbf { \odot } } yr ^ { \mathbf { -1 } } ) . Their progenitors are likely the sub-millimeter-bright galaxies ( SMGs ) [ 2 ] at redshifts ( \mathbf { z } ) greater than 2 . While SMGs ’ mean molecular gas mass [ 3 ] of \mathbf { 5 \times 10 ^ { 10 } } M _ { \mathbf { \odot } } can explain the formation of typical elliptical galaxies , it is inadequate to form ellipticals [ 4 ] that already have stellar masses above \mathbf { 2 \times 10 ^ { 11 } } M _ { \mathbf { \odot } } at \mathbf { z \approx 2 } . Here we report multi-wavelength high-resolution observations of a rare merger of two massive SMGs at \mathbf { z = 2.3 } . The system is currently forming stars at a tremendous rate of 2,000 M _ { \mathbf { \odot } } yr ^ { \mathbf { -1 } } . With a star formation efficiency an order-of-magnitude greater than that of normal galaxies , it will quench the star formation by exhausting the gas reservoir in only \mathbf { \sim 200 } million years . At a projected separation of 19 kiloparsecs , the two massive starbursts are about to merge and form a passive elliptical galaxy with a stellar mass of \mathbf { \sim 4 \times 10 ^ { 11 } } M _ { \mathbf { \odot } } . Our observations show that gas-rich major galaxy mergers , concurrent with intense star formation , can form the most massive elliptical galaxies by \mathbf { z \approx 1.5 } .