Iron and magnesium are naturally occurring minerals that serve as essential nutrients. The Massachusetts Institute of Technology indicates that iron contributes to proper metabolism, growth and healing, and to transport oxygen in the body. Magnesium is important for energy production and to form proteins. According to The Institute of Medicine, the average adult needs from 8 to 18 milligrams of iron, and between 320 and 420 milligrams of magnesium per day, depending on age and sex.
The USDA Nutrient Database identifies several dried fruits as being high in both magnesium and iron, including dried apricots, prunes and raisins. Raisins for instance, contain around 3 milligrams of iron and 48 milligrams of magnesium per cup. An equal measure of prunes contains around the same amount of these essential minerals.
Many members of the legume family of vegetables provide both dietary magnesium and iron. These include lentils, peas, black-eyed peas, chickpeas, and white, black, kidney, pinto, navy, lima and soy beans. As an example, black beans hold around 3.6 milligrams of iron and 120 milligrams of magnesium, while white beans contain around 8 milligrams of iron and 134 milligrams of magnesium within a 1-cup serving.
Many grain products, particularly those that use the whole grain, have substantial amounts of both magnesium and iron. These include barley, cornmeal, oat bran and rice. Whole wheat flour delivers among the highest amounts within this category, providing 166 milligrams of magnesium and almost 5 milligrams of iron per cup. Some breakfast cereals are also supplemented with both minerals.
Several leafy green vegetables also contain significant amounts of dietary iron and magnesium. The USDA Nutrient Database states that cooked beet greens possess 2.7 milligrams of iron and 90 milligrams of magnesium in a single cup serving, while the same amount of cooked spinach holds 6.5 milligrams of iron and 157 milligrams of magnesium. The database also points out that iceberg lettuce contains 2.7 milligrams of iron and 49 milligrams of magnesium in each head. Pumpkin also contains both minerals, with 1 cup holding 3.4 milligrams of iron and 50 grams of magnesium.
Several other foods are identified by the USDA Nutrient Database as being high in both minerals. There are 3.5 milligrams of iron and 43 milligrams of magnesium in a single tablespoon of black strap molasses. Within a dozen raw oysters oysters, there is nearly 80 milligrams of magnesium and 12 milligrams of iron. Duck meat is also high in both minerals with 6 milligrams of iron and 44 milligrams of magnesium.