Receptor activator of nuclear factor (NF)-κB ligand (RANKL), a master cytokine that drives osteoclast differentiation, activation and survival, exists in both transmembrane and extracellular forms. To date, studies on physiological role of RANKL have been mainly carried out with extracellular RANKL probably due to difficulties in achieving high level expression of functional transmembrane RANKL (mRANKL). In the present study, we took advantage of codon optimization and response surface methodology to optimize the soluble expression of mRANKL in E. coli. We optimized the codon usage of mRANKL sequence to a preferred set of codons for E. coli changing its codon adaptation index from 0.64 to 0.76, tending to increase its expression level in E. coli. Further, we utilized central composite design to predict the optimum combination of variables (cell density before induction, lactose concentration, post-induction temperature and post-induction time) for the expression of mRANKL. Finally, we investigated the effects of various experimental parameters using response surface methodology. The best combination of response variables was 0.6 OD600, 7.5 mM lactose, 26°C post-induction temperature and 5 h post-induction time that produced 52.4 mg/L of fusion mRANKL. Prior to functional analysis of the protein, we purified mRANKL to homogeneity and confirmed the existence of trimeric form of mRANKL by native gel electrophoresis and gel filtration chromatography. Further, the biological activity of mRANKL to induce osteoclast formation on RAW264.7 cells was confirmed by tartrate resistant acid phosphatase assay and quantitative real-time polymerase chain reaction assays. Importantly, a new finding from this study was that the biological activity of mRANKL is higher than its extracellular counterpart. To the best of our knowledge, this is the first time to report heterologous expression of mRANKL in soluble form and to perform a comparative study of functional properties of both forms of RANKL.