This paper discusses mechanisms of optical nonlinearity of gold and silver nanoparticles (NPs) embedded in anisotropic glass made of cobalt octanoate. Noble metal nanoparticles were synthesized and stabilized in thermotropic phase of ionic liquid crystals (ILC). Anisotropic glassy nanocomposites were obtained by cooling the liquid crystal phase of these materials down to the room temperature. The following samples were prepared: (1) - cobalt octanoate, thickness 28, 8 μm; (2) - cobalt octanoate with 4 mol.% Au NPs, thickness 53 μm; (3) - cobalt octanoate with 4 mol.% Ag NPs, thickness 65 μm. Obtained materials exhibit long time stability, and are easy to use. The shape of noble metal nanoparticles stabilized and ordered by the glassy smectic matrix is nearly spherical, and their size distribution is very narrow. Both the host material (cobalt octanoate) and noble nanoparticles (Au and Ag) absorb light in the same visible region of the spectrum. This feature allowed us to explore an effect of the light absorbing host on the optical nonlinearity of nanocomposites “noble metal nanoparticles – smectic glass”. Nonlinear-optical response of proposed new materials was studied by applying a Z-scan method in the regimes of the resonance and off-resonance excitations. The use of femtosecond and nanosecond laser pulses at different wavelengths shed the light on mechanisms of the nonlinear absorption (NA) and the nonlinear refraction (NR) in smectic glasses doped with noble metal nanoparticles. We discuss physical mechanisms and factors (electric field enhancement effect, surface plasmon resonance excitations, hot electrons, and thermal nonlinearity of the matrix, to name a few) which could contribute to the optical nonlinearity of the above-mentioned materials. Reported materials are promising candidates for their applications in the fields of photonics and plasmonics.