Hi, welcome to the forum.
I didn't check the schematic or the board layout, but that might be a mosfet that is used to turn the USB power off, when power is applied to the power jack.
How did you connect the 12V ? Only the power jack (DC power barrel jack) or the VIN pin. What kind of 12V was it ? DC or AC, 12V or 18V ? An unregulated 12V power supply could have an output of 18V without load.
It should not smoke, because there is a 500mA polyfuse next to it.
Is it an official board ? If yes, which offcial version ? the Arduino.org or the Arduino.cc version ?
Perhaps there is a shortcut on the board.
Was the power supply to the power jack 6V or 7V, instead of 12V ? A voltage below 7.5V does not turn off the USB power.
You could remove that component. Use a big blob of solder and heat all three pins, it should easily fall off.
Perhaps you could use a magnifier to check for shortcuts.
After that use 7.5V to the power jack, and measure the 5V pin and 3.3V pin. If they are okay, increase the voltage to 12V.
However, there might be something else that is damaged on the board. This Mega board is no longer reliable.