Magnetic nanoparticles are of widespread use in nanotechnology. One of the most unusual are magnetic palladium nanoparticles that combine magnetism with high catalytic activity. These nanoparticles could be obtained biologically by exposing bacteria to a palladium salt. Due to their small size and weak magnetism, however, it is challenging to measure their magnetic properties. One of the solutions to enhance their magnetism is to incorporate a small amount of iron atoms into them. After this procedure, the nanoparticles together with bacteria can be embedded in resin and characterized by the technique of magnetic force microscopy. This technique allows imaging cross-sections of the bacteria with nanoparticles, but cannot give information from the depth of the sample. Here we report on an approach partially solving this problem. Its novelty lies in measurements of consecutive thin slices of resin, which allows mapping cross-sections of individual bacteria and different parts of the material surrounding the same bacterium. An interesting observed feature is the formation of magnetic chains of nanoparticles outside of the bacteria.