This study examines the tail disconnection event on April 20, 2007 on comet 2P/Encke, caused by a coronal mass ejection (CME) at a heliocentric distance of 0.34 AU. During their interaction, both the CME and the comet are visible with high temporal and spatial resolution by the STEREO-A spacecraft. Previously, only current sheets or shocks have been accepted as possible reasons for comet tail disconnections, so it is puzzling that the CME caused this event. The MHD simulation presented in this work reproduces the interaction process and demonstrates how the CME triggered a tail disconnection in the April 20 event. It is found that the CME disturbs the comet with a combination of a $180^circ$ sudden rotation of the interplanetary magnetic field (IMF), followed by a $90^circ$ gradual rotation. Such an interpretation applies our understanding of solar wind-comet interactions to determine the textit{in situ} IMF orientation of the CME encountering Encke.