Stepper Motor Rating

So it is a unipolar stepping motor not a bi-polar one?

so I think I did have a shoot through.

Only if you were trying to implement a H-bridge with your transistors.

A 2n2222 is only rated at 600mA, that's too close to your required 500mA so you need a bigger one.

I put the 5V to the two input wires of the motor.

Not sure I understand this?
What sort of motor have you got and a schematic of how you wired it up would help.

See:-
http://www.thebox.myzen.co.uk/Workshop/Motors_3.html
and
http://www.thebox.myzen.co.uk/Workshop/Motors_4.html