Membrane spanning regions can be used as markers for studying the robustness of biologically important units of proteins against evolutionary change (R. Sawada and S. Mitaku, Genes to Cells, 2010). We carried out computational experiments of extensive DNA mutations on the assumption of constant GC content or constant codon positional nucleotide biases. Randomized sequences were evaluated by membrane protein prediction systems SOSUI and SOSUIsignal. When all amino acid sequences from the total real genomes of 538 prokaryotes were analysed, ratios of membrane proteins to all genes in the total genomes were almost constant around a ratio of 22% with a standard deviation of 1.56. When the nucleotide sequences were randomized, keeping only the GC contents constant, the ratios of membrane proteins became highly diverse with a standard deviation of 10.1. When the codon positional nucleotide biases were taken into account; however, the diverse ratios of membrane proteins converged to a value of ∼25% with a standard deviation of 3.55. These results suggest that codon compositional biases play an important role in the evolution of prokaryotes for maintaining a constant ratio of membrane proteins. Further detailed analysis suggested that non-uniform nucleotide compositional biases at the terminal regions are the reason for the small but significant deviation.