Comparative studies of the properties of metal/nanocomposite/metal (M/NC/M) memristive structures based on NC consisting of a LiNbO 3 matrix and various Co-Fe-B or CoFe metal granules have been carried out. The M/NC/M structures were obtained using ion-beam sputtering from composite targets Co 40 Fe 40 B 20 -LiNbO 3 and Co 50 Fe 50 -LiNbO 3 on glass-ceramic substrates. The same NC layers were synthesized on polyimide substrates to study the structural features by X-ray absorption fine structure spectroscopy (XAFS). The XAFS data show an identical crystal structure of granules in both types of NC, indicating that a significant part of the B atoms during the synthesis of NC is in an insulating matrix, forming an oxide of the B 2 O 3 type, which is confirmed by X-ray photoelectron spectroscopy data. In this case, no metallic state of niobium is observed in the layers. Both types of M/NC/M structures demonstrate resistive switching (RS), however, in the case of NC with boron, the RS effect is much stronger, which is explained by the significant role of oxygen vacancies formed during the oxidation of boron in the RS.