Stellar archeology 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_sun/yr). Their progenitors are likely the sub-millimeter-bright galaxies (SMGs) at redshifts (z) greater than 2. While SMGs mean molecular gas mass of 5x10^10 M_sun can explain the formation of typical elliptical galaxies, it is inadequate to form ellipticals that already have stellar masses above 2x10^11 M_sun at z ~ 2. Here we report multi-wavelength high-resolution observations of a rare merger of two massive SMGs at z = 2.3. The system is currently forming stars at a tremendous rate of 2,000 M_sun/yr. 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 ~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 ~4x10^11 M_sun. Our observations show that gas-rich major galaxy mergers, concurrent with intense star formation, can form the most massive elliptical galaxies by z ~ 1.5.