This study entitled " The Analysis of Code-mixing in Sagra Short Stories Compilation and Kenanga Novel by Oka Rusmini " aims to find out the types of code-mixing, the code-mixing in the grammatical and syntactic categories, and the factors that cause the code-mixing. Those aims were obtained by using the theory of sociolinguistics, and the method used was attention, supported by free listening proficiency techniques and note-taking techniques. The data analysis process was in a descriptive-qualitative and split methods, and presented in formal and informal methods. The findings of this study are (1) in the compilation of short stories Sagra, there are eighteen data of inner code-mixing consisting Balinese code-mixing in the Indonesian language, five data of outer code-mixing consisting English code-mixing and Japanese code-mixing in the Indonesian language and no mixed code-mixing was found. Moreover, in the Kenanga novel, there are thirty-eight data of inner code-mixing consisting Balinese code-mixing in the Indonesian language, ten data of outer code-mixing consisting English code-mixing in the Indonesian language, and one data of mixed code-mixing consisting English and Balinese in Indonesian language; (2) the grammatical code mixing found in the compilation of short stories Sagra are phrases level that divided into two categories namely attributive endocentric phrases with two data found and exocentric phrases with three data found, and in the word level, there are seven data of base words, two data of affixed complex words, and one data of complex word with clitic. Meanwhile, in the Kenanga novel, there was found one data in clause level, the phrases level that divided into two categories, the attributive endocentric phrases with seven data and the exocentric phrases with two data, and in the word level, there were found seventeen data of base words, three data of affixed complex words and two data of complex words with clitic, and in the syntactic category, nouns, verbs and adjectives categories were found; (3) the factors that cause the code-mixing are participant factor and topic factor.