How to restore my iPhone when iTunes keeps returning an error 2001? My iPhone 5 won't boot anymore and when I plug it in my MacBook, it goes to recovery mode (cable logo => iTunes logo).

So I tried to restore it using iTunes but I keep getting this error



Any idea how to fix it?

While it was plugged in I tried holding power + home, it reboots the device and goes back to recovery mode and then any restore attempt results in a 2001 error as well. When it's not plugged in nothing will make it boot.
I'm having the same issue as you described it here. I have a iPhone 5, too.

If you have done anything suggested by Apple, it's a battery issue. You need to change the battery in order it to work. Otherwise, I don't think there is any other way you can make it work. Attached is the link from Apple.

https://support.apple.com/en-us/HT201210

For my situation, before it turned out to error 2001, the temperature of my phone was pretty hot, so I shut it down to let it cool. But after a while, when I wanted to reboot it, it turned out like this. 

So I had been searching around the internet for over a hour to seek a solution, all the people were suggesting to try the fix by above link. For me, it did not work. After having reading several forums, they suggested to change the battery. Therefore, I decided to change my battery.
At the same time, I didn't really want to take it to Apple Stores because I think my problem lies on the battery and it would cost me over 70 dollars to let them fix it.

So I ordered the iPhone 5 battery tool kit from Amazon. It was around 15 dollars. I followed a tutorial on the internet to change the battery. It's pretty easy. Then I fixed the problem.