Why is my transistor getting very hot when controlling a 12V peristalic pump? I have followed this tutorial:

http://www.instructables.com/id/Automatically-water-your-small-indoor-plant-using-/?ALLSTEPS

Every time i try to run my circuit, My transistor gets very hot and breaks. 

I have exactly the same parts as the tutorial. I have also tested the circuit with 3.3V Power supply and a diode instead of an engine, this works. 

I am super thankfull for any answers.
Measure the Current through the motor, the PN2222 can pass a maximum of 600mA.
I would guess that just over half an amp would be enough for the motor but you can check what you motor is trying to pull by connecting it to 12 V direct and measure the supply current.
The only thing that will make the transistor hot is excess current