For a simple graph \(\mathcal {G}= (\mathcal {V}, \mathcal {E})\) , an L(2, 1)-labeling is an assignment of non-negative integer labels to vertices of \(\mathcal {G}\) . An L(2, 1)-labeling of \(\mathcal {G}\) must satisfy two conditions: adjacent vertices in \(\mathcal {G}\) should get labels which differ by at least two, and vertices at a distance of two from each other should get distinct labels. The \(\lambda \) -number of \(\mathcal {G}\) , denoted by \(\lambda (\mathcal {G})\) , represents the smallest positive integer \(\ell \) for which an L(2, 1)-labeling exists, the vertices of \(\mathcal {G}\) are provided labels from the set \(\{0, 1, \dots , \ell \}\) . Let \(\Gamma (R)\) be a zero-divisor graph of a finite commutative ring R with unity. In \(\Gamma (R)\) , vertices represent zero-divisors of R, and two vertices x and y are adjacent if and only if \(xy = 0\) in R. The methodology of the research involves a detailed investigation into the structural aspects of zero-divisor graphs associated with specific classes of local and mixed rings, such as \(\mathbb {Z}_{p^n}\) , \(\mathbb {Z}_{p^n} \times \mathbb {Z}_{q^m}\) , and \(\mathbb {F}_{q}\times \mathbb {Z}_{p^n}\) . This exploration leads us to compute the exact value of L(2, 1)-labeling number of these graphs.