A team from the UK's University of Leeds and Japan's Tokyo University of Agriculture and Technology have used microbes that eat iron.
As they ingest the iron, the microbes create tiny magnets inside themselves, similar to those in PC hard drives.
The research may lead to the creation of much faster hard drives, the team of scientists say.
As technology progresses and computer components get smaller and smaller, it becomes harder to produce electronics on a nano-scale.
So researchers are now turning to nature - and get microbes involved.
In the current study, the scientists used the bacterium Magnetospirilllum magneticum.
These naturally magnetic microorganisms usually live in aquatic environments such as ponds and lakes, below the surface where oxygen is scarce.