The aim of this study is to investigate the effects of the components of the medium on nitrilase expression in recombinant Escherichia coli ( E. coli), which is applied in the hydrolysis of racemic mandelonitrile (MN) to R-mandelic acid (MA). In addition, the separation of R-MA from the reaction mixture is studied. The glycerol medium is screened, and compositions are optimized in single-factor experiments. The nitrilase activity is 1.96-fold higher than before using the optimal medium containing peptone 15 g/L, yeast extract 12 g/L, NaCl 10 g/L, glycerol 15 g/L, (NH4)2SO4 5 g/L, KH2PO4 10 mM, K2HPO4·3H2O 10 mM, and MgSO4·7H2O 15 mM. During the acid-base extraction of R-MA, the optimal alkaline pH, the alkaline extractant ratio, the optimal acidic pH, the acidic extractant ratio and the amount of activated carbon are 10.0, 1:0.5 (once), 2.50, 1:2 (twice) and 1%, respectively. This study provides a basis for the industrial production of R-MA.