The guanidine group, [C(NH2)3]+, is a promising π-conjugated unit for nonlinear optical (NLO) materials. However, its saturated amino coordination typically leads to weak hydrogen bond interaction and zero-dimensional structures, limiting the stability and mechanical strength. Herein, we propose a design strategy that constructs a non-centrosymmetric (NCS) three-dimensional (3D) framework for [C(NH2)3]+ by utilizing (HCOO)- and rare-earth cations and successfully synthesizes a novel 3D guanidine-based compound, [C(NH2)3]Y(HCOO)4, which not only effectively immobilizes the [C(NH2)3]+ but also induces an NCS arrangement. This crystal exhibits a strong second-harmonic generation response of 1.7 × KH2PO4, a short UV cutoff edge of 236 nm, an appropriate birefringence of 0.099@546 nm, and good thermal stability, fulfilling critical requirements for UV NLO applications. This work provides a new strategy for developing high-performance guanidine-based UV NLO materials.