We present a general scheme for synthesizing a spatially periodic magnetic field, or a magnetic lattice (ML), for ultracold atoms using pulsed gradient magnetic fields. Both the period and the depth of the artificial ML can be tuned, immune to atomic spontaneous emission often encountered in optical lattices. The effective Hamiltonian for our 2-dimensional ML has not been discussed previously in condensed matter physics. Its band structures show interesting features which can support topologically nontrivial phases. The technical requirements for implementing our protocol are readily available in todays cold atom experiments. Realization of our proposal will significantly expand the repertoire for quantum simulation with ultracold atoms.