Global urbanization leads to the loss of periurban farming land and increases dependency on distant agriculture systems. This provokes greenhouse gas emissions associated with transportation and storage while disconnecting nutrient cycles, as urban organic waste is not recycled into the agricultural system. Urban food production based on composted local biomass could reduce these problems, but currently used hybrid crops rely strongly on inorganic fertilizers. On the contrary, open-pollinated varieties were bred for productivity under organic fertilization, such as compost. Hypothesising that open-pollinated varieties retain high nutritional value under low nutrient conditions, a commercial hybrid and a local open-pollinated variety of maize were cultivated in non-fertilized soil and under two compost applications: Municipal compost as high nutrient input or locally produced green waste compost and municipal compost mix, as medium nutrient input. Unfertilized plots exhibited low grain production (1.9 t/ha), but yields under green waste compost/municipal compost (6.1 t/ha) and municipal compost (7.8 t/ha) treatments were comparable to observations from maize under inorganic fertilization. Contrary to the commercial variety, the open-pollinated variety exhibited higher grain micronutrient concentrations, e.g. 220% higher zinc concentrations and lower accumulation of heavy metals, e.g. 74% lower nickel concentrations. This variety-related effect was found in all treatments and was independent of soil micronutrient concentrations. In conclusion, both compost mixes were effective in increasing grain yield in both maize varieties. However, the open-pollinated variety produced grain with higher nutritional values in soil and all treatments, indicating it is potentially better suited for compost-based sustainable urban agriculture.