Will a bad esn iphone 5 from AT&T work with tmobile?

I recently received an iphone 5 through trade, the other person said she couldn't keep up with her payments so she traded it instead, will it work with my carrier which is tmobile?

BAD ESN is a CMDA term (Sprint, Verizon, Virgin Mobile), not a GSM term (ATT/Verizon). There's no such thing as a bad esn phone on ATT or Tmobile.

GSM phones don't run off the ESN. They run off a sim card.

if this is truely a ATT iphone, then simply unlock it and pop in a tmobile sim card