Simple Servo Control Issues with PIC and ICSP
In all likelihood, you are suffering from bad layout causing problems with power. The ugly truth is that physical circuits are not perfect and the imperfections are sometimes not ignorable. Sometimes those imperfections really break a circuit.

The reasons that the circuit works with the ICSP connected is that it is helping regulate the power to the uC. 

Things causing the problem: 


your motor is seeing the same power rail as your uC, and there is nothing in the uC to mitigate the crap the motor is doing to the power. Motors do nasty, bad, evil things to power lines and must be accounted for.
The breadboard. They are OK, but notorious for being less than ideal. In this case, the breadboard doesn't provide a good enough power bus. Couple this with the fact you have a motor... and well, bad things happen.


Here is what I would do:


Add a/some decoupling capacitors to the power pins of the uC. They must be as close as possible to the uC pins. Just a 0.1uF from pin 20 to pin 9 on the uC should get you going.
If you have a second 7805, use it. Use 1 7805 for the uC and a separate 7805 for the motor. Do not tie the 5V+ lines together, but they can share ground. 


Try 1 first, if it doesn't work, try 2 also. That will almost certainly work.

One last thing: I would also add a resistor to the FET driver: See https://i.imgur.com/k6iyO8P.png