Measurements of four-lepton (4$\ell$, $\ell=e,\mu$) production cross sections at the $Z$ resonance in $pp$ collisions at the LHC with the ATLAS detector are presented. For dilepton and four-lepton invariant mass region $m_{\ell^+\ell^-} > 5$ GeV and $80 < m_{4\ell} < 100$ GeV, the measured cross sections are $76 \pm 18 \text { (stat) } \pm 4 \text { (syst) } \pm 1.4 \text { (lumi) }$ fb and $107 \pm 9 \text{ (stat) } \pm 4 \text{ (syst) } \pm 3.0 \text { (lumi) }$ fb at $\sqrt s$ = 7 and 8 TeV, respectively. By subtracting the non-resonant 4$\ell$ production contributions and normalizing with $Z\rightarrow \mu^+\mu^-$ events, the branching fraction for the $Z$ boson decay to $4\ell$ is determined to be $\left( 3.20 \pm 0.25\text{ (stat)} \pm 0.13\text{ (syst)} \right) \times 10^{-6}$, consistent with the Standard Model