At high pressure and temperature, the phase diagram of elemental carbon is poorly known. We present predictions of diamond and BC8 melting lines and their phase boundary in the solid phase, as obtained from first-principles calculations. Maxima are found in both melting lines, with a triple point located at approximately 850 GPa and approximately 7,400 K. Our results show that hot, compressed diamond is a semiconductor that undergoes metalization upon melting. In contrast, in the stability range of BC8, an insulator to metal transition is likely to occur in the solid phase. Close to the diamond/liquid and BC8/liquid boundaries, molten carbon is a low-coordinated metal retaining some covalent character in its bonding up to extreme pressures. Our results provide constraints on the carbon equation of state, which is of critical importance for devising models of Neptune, Uranus, and white dwarf stars, as well as of extrasolar carbon-rich planets.