In this paper we explain how four-dimensional general relativity and, in particular, the Einstein equation, emerge from the spin-foam amplitude in loop quantum gravity. We propose a new limit that couples both the semiclassical limit and continuum limit of spin-foam amplitudes. The continuum Einstein equation emerges in this limit. Solutions of the Einstein equation can be approached by dominant configurations in spin-foam amplitudes. A running scale is naturally associated to the sequence of refined triangulations. The continuum limit corresponds to the infrared limit of the running scale. An important ingredient in the derivation is a regularization for the sum over spins, which is necessary for the semiclassical continuum limit. We also explain in this paper the role played by the so-called flatness in spin-foam formulation, and how to take advantage of it.