The purpose of this study was to determine the use of code-switching in teaching English. This research method is qualitative. To achieve the research objectives, the data collected were in the form of observation and interviews. The population of this study was a teacher who taught eleventh grade at SMAN 2 Pangkep and three students to get their perception of the use of code-switching in teaching English. The research findings showed that: 1) the teacher did code-switch at school not only in the classroom, 2) code-switching motivated the teacher to use her language interaction, and 3) the teacher’s ways used more than one language such as Bahasa Indonesia to English or English to Indonesia, it helped and motivated the students to learn English more by using code-switching step by step. According to the interview and observation from the teacher and students, using code-switching motivated them to learn English more. Most of the students agreed if the teacher used code-switching in teaching English. Therefore, it can be concluded that the use of code-switching by the teacher helped the students enjoy learning English.