It looks like there are some issues with your circuit. Summing up the comments: - Your diode has the wrong polarity to stop back-emf - Your base resistor is too large Here is an updated schematic with these fixes. <!-- Begin schematic: In order to preserve an editable schematic, please don't edit this section directly. Click the "edit" link below the image in the preview instead. --> ![schematic](https://i.sstatic.net/zkpZb.png) <!-- End schematic --> You could also take a look at [this answer][1] to see a bit more info on driving a solenoid. [1]: http://electronics.stackexchange.com/a/112182/49251