Hello Sudheer, it sounds like you may have a problem with your power supply.
One of the simplest ways to check is to disconnect the power from all of you drives except the HDD and then boot up your PC.
Sometimes your PSU ( power supply unit) may have a fault and it can't supply enough power to all of your drives and as it starts to attempt to power all your devices, it simply gets drained and the computer no longer has the power to run, resulting in a shut down.
You can also check the power ratings labeled onto the side of your PSU, and you might be able to use the one out of your old PC.
However if you know how to safely use a voltmeter to test the voltages on the PSU leads this will help. (Do not attempt this if you don't know how!