Ciliates represent higher unicellular animals, and several species are also important model organisms for molecular biology research. Analyses of codon usage bias (CUB) of the macronuclear (MAC) genome in ciliates can not only promote a better understanding of the genetic mode and evolution history of these organisms but also help optimize codons to improve the gene editing efficiency of model ciliates. In this study, macronuclear genome sequences of nine free-living ciliates were analyzed with CodonW software to calculate the following indices: the guanine-cytosine content (GC); the frequency of the nucleotides U, C, A, and G at the third position of codons (U3s, C3s, A3s, G3s); the effective number of codons (ENC); the correlation between GC at the first and second positions (GC12); the frequency of the nucleotides G + C at the third position of synonymous codons (GC3s); the relative synonymous codon usage (RSCU). Parity rule 2 plot analysis, neutrality plot analysis, and correlation analysis were performed to explore the factors that influence codon preference. The results showed that the GC contents in nine ciliates’ MAC genomes were lower than 50% and appeared AT-rich. The base compositions of GC12 and GC3s are markedly distinct and the codon usage pattern and evolution of ciliates are affected by genetic mutation and natural selection. According to the synonymous codon analysis, the codons of most ciliates ended with A or U and eight codons were the general optimal codons of nine ciliates. A clustered regularly interspaced short palindromic repeats/Cas9 (CRISPR/Cas9) expression vector of Stylonychia lemnae was constructed by optimizing the macronuclear genome codon and was successfully used to knock out the Adss gene. This is the first such extensive investigation of the MAC genome CUB of ciliates and the initial successful application of the CRISPR/Cas9 technique in free-living ciliates.