Optical fibers are widely used in bioimaging systems as flexible endoscopes that are capable of low-invasive penetration inside hollow tissue cavities. Here, we report on the technique that allows magnetic resonance imaging (MRI) of hollow-core microstructured fibers (HC-MFs), which paves the way for combing MRI and optical bioimaging. Our approach is based on layer-by-layer assembly of oppositely charged polyelectrolytes and magnetite nanoparticles on the inner core surface of HC-MFs. Incorporation of magnetite nanoparticles into polyelectrolyte layers renders HC-MFs visible for MRI and induces the red-shift in their transmission spectra. Specifically, the transmission shifts up to 60 nm have been revealed for the several-layers composite coating, along with the high-quality contrast of HC-MFs in MRI scans. Our results shed light on marrying fiber-based endoscopy with MRI to open novel possibilities for minimally invasive clinical diagnostics and surgical procedures in vivo.