iPhone 4 would not turn on unless it is plugged in
Your battery is mostly likely dead and needs replacing. You have three options:


Take to an AppleStore (expensive - and probably not cost effective as you have bought the phone second hand);
Purchase a replacement battery and replace it yourself
(Luckily, replacing the battery on the iPhone 4 requires minimal
disassembly), or;
Send it to a battery replacement service (easily found online, or
offered through eBay, and not too pricey)


This has happened to me many times (5 or 6 times) and I always go for option three, because I am lazy.