Characterization of two rapid-quenched Nd-Fe-B alloys with nonstoichiometric Nd content in the optimized magnetic state was carried out using the X-ray diffractometry (XRD), 57Fe M?ssbauer spectroscopic phase analysis (MS), electron microscopy (TEM), high resolution TEM (HREM) and Superconducting Quantum Interference Device (SQUID) magnetometer. The experimental results demonstrate the fundamental difference in the structure and magnetic properties of the two investigated alloys in the optimized magnetic state. The Nd-Fe-B alloy with the reduced Nd content (Nd4.5Fe77B18.5) was found to have the nanocomposite structure of Fe3B/Nd2Fe14B and partly ?-Fe/Nd2Fe14B, with mean grain size below 30 nm. On the other side, the overstoichiometric Nd14Fe79B7 alloy has almost a monophase structure with the dominant content of the hard magnetic phase Nd2Fe14B (up to 95 wt. %) and a mean crystallite size about 60 nm, as determined by XRD and TEM analysis. The results of magnetic measurements on SQUID magnetometer also suggest the nanocomposite structure of the Nd-low alloy and nanocrystalline decoupled structure of the Nd-rich alloy after the optimal heat treatment.