I made a project to control two DC motors with an IR control. Is working perfectly with the serial port of the PC, but when I use the external power 9v battery (with adapter cable), the motors do not work when I press the control. What did might be happening?
Almost certainly the problem is the lack of current a 9V (presumably you mean a PP3 type?) can provide.
It's always a good idea to provide a circuit diagram when asking a question like this.