The problem could well be the battery. They are usually good for about 1.5 years.
After that they show a cycle of charging to 100%, lasting on battery for a short period of time, showing little remaining power, and then charging again to 100%.
cdogg may well be right, but I suspect the battery rather than the computer.
See if the notebook will allow a battery to be inserted in either bay, many will allow this so that two batteries can be used. If it does the same thing in the second bay I strongly suspect the battery. Finally, look on the battery itself. Many have a test button and indicator lights. Hold the test button down for at least a minute. If you see all the lights come on, and then start dropping off during the minute, replace the battery.
Note too that Li-on (and other types) are rated for only a certain number of full discharge/charge cycles. My Li-on from dell are rated at 67 cycles.