Chosen Solution
The other day, I opened my MacBook Pro and was surprised that it was shut off completely and not just asleep, but no biggie until I start it up and about 2-3 seconds later it shuts itself off. Tried it several times with the same result. I zapped the PRAM, tried booting restore volume as well as another startup disk, and none of that worked. Once or twice, it would boot up fast enough to see my desktop and click a couple of things to see that everything looked okay once in. Then I reset the SMC. At first, it bricked. The power light on the charger went off and it wouldn’t start at all no matter what I did. So I took the cover off the back and disconnected the battery which made it light up again, but still powered off after 2-3 seconds of coming on. From my troubleshooting, I’m pretty sure there is something wrong with the power button. It acts as if it is stuck. Maybe something got into it? I popped the button off and blew some air in there but no sign of moisture or damage from the top. Is there any way to test the power button? Does anyone have another theory or troubleshooting ideas?
Remove the bottom cover, disconnect the battery and disconnect the keyboard. Plug the charger in, if it turns itself off, there is likely a fault with the logic board. If not, it will be a fault with the keyboard. I have seen your issue mainly in Macbook Airs a few times, where it will recognise a single press of the power button, but will act like you are holding down the power button once it is switched on.
To verify if the power switch its self is bad you can also turn the system on using the power pads shown here:
Short out the two contacts and if this works reliably then you’ll need to replace the Upper Case or if you have the patience you could dive deeper by replacing the keyboard it self. Here is the IFIXIT guide you’ll need to follow to get to the point of either replacing the upper case or going the next step replacing the keyboard: MacBook Pro 15" Retina Display Mid 2014 Upper Case Assembly Replacement. Once you get to the last step you can then remove the keyboard. Here’s a YouTube vid of someone doing a 2012 model with is basically the same: Macbook Pro 15" Retina A1398 Change Keyboard. This model uses plastic rivets which are a pain to get out which is why you see the force needed to pull out the old keyboard. Here’s your choices: MacBook Pro 15" Retina (Late 2013/Mid 2014) Upper Case Assembly It has a fresh battery which is why its so much more.MacBook Pro 15" Retina Backlit Keyboard