We carry out a numerical simulation depicting the effects of a coronal mass ejection (CME) event on a close-in giant planet in an extrasolar system. We drive the CME in a similar manner as in simulations of space weather events on Earth. The simulation includes the planetary orbital motion, which leads to the forming of a comet-like planetary magnetotail which is oriented almost perpendicular to the direction of propagation