TIP31 (TIP120) as DC Motor driver compare to MOSFET
The drawing you just added shows that the bypass cap accross the PIC is missing, there are no caps on the crystal, and there is nothing to limit the current out of the PIC into the transistor.  Each one of these can cause flaky operation.

EDIT: I just noticed the motor seems to be connected to ground, not power.

EDIT2: And the emitter is connected to power instead of ground.