It sounds like it may be a battery transfer board or logic board problem. It'll definitely need to be serviced.
How recently did you buy it? If it's with in 10 days (I think) you can probably have Apple declare it DOA and get it replaced with a new machine. Otherwise call AppleCare they'll send you a box to return it for service or you can take it to a local service centre.