Your laptop is shutting off before excess heat can damage the CPU and other components.
Check what you have it sitting on - there MUST be a clear path below it for fresh air to get sucked in by the fans.
Check the fans - can you hear them start up during those first few seconds of power? If not, you will need the laptop repaired by a qualified technician capable of dismantling a laptop.
If the fans can be heard, check the exhaust port - can you feel hot air being expelled from it? If not, the same applies as above.
If you can feel hot air, you should check that the fans and the ventilation ports are not clogged up with dust, fluff, bits of debris. These ventilation ports need to be clear at all times.
You can buy compressed air in a can like an aerosol (it comes with a little plastic straw for aiming the flow of air more easily). You can blow the ventilation ports with the compressed air to help in shifting bits of fluff that might have got in and blocked the flow of air.