For a vertex u in a graph and a given positive integer k, let Mk(u) denote the set of vertices whose distance from u is at most k. A graph satisfies the local Dirac's condition if the degree of each vertex u in it is at least |M2(u)|2. Asratian et al. disproved that a connected graph G on at least three vertices is Hamiltonian if G satisfies the local Dirac's condition. In this paper, we prove that if a connected graph G on at least three vertices satisfies the local Dirac's condition, then G contains a 2-factor. Our result is best possible.