I think i have to use a reverse connected diode across the dc motor and have to replace the BJT switch with a MOSFET switch. Is it so?
That's the first thing I would try to do. Always a good idea to place a diode across the motor armature connection unless you are going to reverse the polarity. You also need to use a "logic level" MOSFET that will turn on fully with just a few volts on its gate.
You may need to precede the MOSFET gate connection with a transistor that will pull the gate toward +12 V DC through a resistor when the transistor is off. The resistor is connected to the NPN transistor collector to limit the collector current when the transistor turns on. A largeish value in the neighborhood of 50 kΩ to perhaps 1 Meg-ohm would work just fine. Note that this will invert the logic of your PIR device, turning on the MOSFET when the PIR output goes low.
Depending on PIR actual output and MOSFET gate sensitivity, you might be able to use an emitter-follower configuration to drive the MOSFET gate, allowing the MOSFET to turn on when the PIR output goes high. Or add a second transistor to invert the output of the first transistor.
Your BC547B is only rated for 100 mA of continuous collector current, and since the motor runs faster when directly connected to the 12 V DC supply, the transistor is either not being driven on hard enough for saturation of the collector-to-emitter voltage (typically less than 0.6 V for Ic = 100 mA) or you have exceed the 100 mA maximum continuous current specification. You may also have bricked the transistor with high-voltage motor transients since there was no reverse-connected diode across the motor. These transients are associated with turning the transistor off, and they can reach several hundred volts, destroying the collector-base junction almost instantly.
Thank you for your kind reply...can you suggest a MOSFET switch for this purpose?
I keep on hand a bunch of
2N7000 MOSFET transistors. Use Google to find equivalents in India.