The only thing you can do is
A: If the phone was lost, or stolen, return it to its rightful owner.
B: If you purchased this phone and discovered it was stolen or lost, report it to the authorities and the carrier it's locked to.
C: Discuss why the ESN is bad with the carrier. It might be due do an unpaid bill while the phone was on contract.
That's all you can do.
With that I'm closing this thread.
Good luck and I hope you make the right decision.