How to prevent interference between dc motor and arduino?
There are two basic things you need to do:


Use proper pullup resistors on your I2C lines (2.2kΩ) instead of relying on the (terrible) internal pullups of the ATMega
Add capacitors to the motors.


For point 2 you need two or three small ceramic capacitors (10nF to 100nF) per motor.


Connect one from each terminal to the motor's body
Optionally connect a third between the two terminals of the motor


This will reduce the EMI produced by the motor, and the improved pullups should reject EMI easier.

(Even if this doesn't entirely fix your underlying issue, it's certainly something that you should do regardless.)