I am having exactly the same issue (as the O.P.) on my Nexus 4.
For a while I was able to (most of the time) get it to boot fully into the os, when it was plugged in. Although unplugging would cause it to turn off after a few seconds. The battery is not the issue, because that still charges, and...