either that or under load the motors put more noise on your power supply and disrupt the microcontroller. Do you have separate batteries for the motors and the arduino?
even with that you have to consider ground bounce. It is generally best for the digital ground to be connected to the motor ground in a single place. That place would typically be on the going connection of you motor driver board.
Hey, car is working now! the problem was my ground were not in a single place and power which I supplied was inappropriate but I checked it using multimeter and limited the voltage and placed all ground wires in a single place. now it's working!
Thanks Everyone! For your support.