In this paper, we are going to characterize the space ${\rm BMO}({\mathbb R}^n)$ through variable Lebesgue spaces and Morrey spaces. There have been many attempts to characterize the space ${\rm BMO}({\mathbb R}^n)$ by using various function spaces. For example, Ho obtained a characterization of ${\rm BMO}({\mathbb R}^n)$ with respect to rearrangement invariant spaces. However, variable Lebesgue spaces and Morrey spaces do not appear in the characterization. One of the reasons is that these spaces are not rearrangement invariant. We also obtain an analogue of the well-known John-Nirenberg inequality which can be seen as an extension to the variable Lebesgue spaces.