I would pressume that its either as Emperus has said OR theres always the possiblity that the battery isnt transfering the power over to your PC correctly.
Take the battery out and any other devices and also the power cable. Now it has no source of power hold the power button down for about 20 seconds afterward plug the main cable in, boot into windows and then put your battery in.
Give it a try after that, if no effect post your specs and list any usb devices pluged in also.
please include your battery version and the model of your particular machine
I am assuming you are talking about a UPS.
Chances are, you have a decent PSU that has active PFC. It doesn't like the modified sine wave the UPS provides, and shuts off. If that is the case, you will need a UPS that provides a true sine wave, like the APC Smartpower series. They are more expensive, but will solve this problem.
Edit: If, on the other hand, you're talking about a laptop, how old is it? The battery may have reached the end of its useful life, and need to be replaced.