The authors show that the fungus Boletus edulis loaded with gamma-Fe2O3 nanoparticles is a viable sorbent for magnetic solid phase extraction of trace levels of Co(II) and Sn(II). The surface structure of immobilized magnetized B. edulis was characterized by FT-IR, SEM and EDX. Experimental parameters were optimized. Following elution with 1 M HCl, the ions were quantified by ICP-OES. The limits of detection are 21 pg.mL(-1) for Co(II), and 19 pg.mL(-1) for Sn(II). The preconcentration factors are 100 for both ions. The sorption capacities of the sorbent are 35.8 mg.g(-1) for Co(II) and 29.6 mg.g(-1) for Sn(II). The method was applied to the analysis of certificated reference materials and gave >= 95% recoveries with low RSDs. It was also successfully applied to the quantification of Co(II) and Sn(II) in spiked environmental and food samples.