This study aims to analyze code switching and code mixing as well as the factors that cause code switching and code mixing in the online mobile legends game dialog. This research is a descriptive qualitative research whose data sources come from chat rooms and quick chats in the online mobile legends game. The data of this research are (1) the form of code switching in the online mobile legends game dialogue, (2) the form of code mixing in the mobile legends online game dialogue, and (3) the causes of code switching and code mixing in the mobile legends online game dialogue. Code switching in mobile legends online game dialogue is analyzed based on internal and external forms. Code mixing in mobile legends online game dialogue is analyzed based on the insertion of words and phrases. From the research, five internal code switching data and nine external code switching data were found, while seven data were found from code mixing. The factors that cause code-switching in the online game dialogue of mobile legends are speakers, opponents of speakers, changes in the conversation being discussed, and generating a sense of humor. Factors that cause code mixing include the use of popular words, limitations in using codes, and factors that explain something.