The electrochemical filling of luminescent microporous silicon (PSi) with magnetic metals (Ni, Co) is presented which results in a composite system with specific magnetic and optical properties. The achieved physical properties are compared with mesoporous silicon loaded with Ni nanoparticles (NPs) of comparable size.The light emitting PSi samples are fabricated by electrochemical etching of a moderately doped p-type silicon wafer in a 10 wt% hydrofluoric acid solution. The achieved porous silicon offers a branched morphology with structure sizes in the range of a few nanometers. The observable visible luminescence is due to quantum confinement effects [1]. The challenging metal filling of these pores is carried out under cathodic conditions by pulsed electrodeposition. As electrolytes aqueous NiSO4 and CoSO4 solutions are employed. Correlated to the branched morphology of the PSi and thus also the deposited nanosized metal structures are interconnected. The structure size of the porous samples is estimated by photoluminescence measurements to 5 nm which also determines the diameter of the deposits.Mesoporous silicon is produced by anodization of a highly n-doped silicon wafer resulting in oriented pores with an average diameter of 50 nm [2]. The loading of these samples with Ni NPs is also carried out by electrodeposition. In contrast to microporous silicon the morphology of mesoporous silicon (mPSi) shows straight pores, grown perpendicular to the sample surface with a diameter up to 50 nm.Magnetic filling of meso- and microporous silicon, respectively means a change in the morphology as well as in the structure size of the magnetic precipitations and both influence the magnetic behavior of the composite system drastically.In the case of light emitting PSi also the luminescence is influenced in its intensity and wavelength by the magnetic filling. With enhanced metal filling a blueshift of the photoluminescence peak is observed.The magnetic properties are investigated with a Vibrating Sample Magnetometer (VSM) and a SQUID, respectively. A luminescence spectrometer is used to measure the intensity and the peak position with respect to the wavelength of the photoluminescence spectrum. The structure is investigated by SEM and TEM.Field dependent magnetization measurements show a distinct difference between metal filled luminescent PSi and mPSi loaded with Ni NPs. Considering luminescent PSi filled with Ni and Co, respectively a strong magnetic anisotropy between the two magnetization directions applying a magnetic field perpendicular and parallel to the surface, is observed, whereas in the case of Co this behavior is even more pronounced. The coercivities do not vary in a broad range between Ni and Co samples, mostly around 10% but the saturation field differs drastically between the two materials. Figure 1 depicts field dependent magnetization curves of luminescent porous silicon filled with Ni and Co, respectively. In contrast mesoporous silicon loaded with Ni NPs offers only a small magnetic anisotropy and also the role of easy axis and hard axis is changed. This different behavior of the two systems can be explained by the differing magnetic interactions between the metal deposits in the two systems. The presented systems which merge optical and magnetic properties within on system are of interest for optoelectronics and magneto optical on-chip devices.[1] Handbook of Porous Silicon, Ed. L. Canham, Springer Int. Publishing (2018).[2] P. Granitzer, K. Rumpf, Front. Phys. 8, 121 (2020). Figure 1