I want to build a balancing bot, but my Nanos burn out

Get rid of the voltage divider and use a 12 volts directly, if you have no other devices being powered by the Nano.
Paul

PS. I doubt you have 12 volts, unless you actually measured it.