Oxide ion and proton conductors, which exhibit high conductivity at intermediate temperature, are necessary to improve the performance of ceramic fuel cells. The crystal structure plays a pivotal role in defining the ionic conduction properties and the discovery of new materials is a challenging research focus. Here we show that the undoped hexagonal perovskite Ba7Nb4MoO20 supports pure ionic conduction with high proton and oxide ion conductivity at 510 °C (the bulk conductivity is 4.0 mS cm-1) and hence is an exceptional candidate for application as a dual-ion solid electrolyte in a ceramic fuel cell which will combine the advantages of both oxide ion and proton conducting electrolytes. Ba7Nb4MoO20 also showcases excellent chemical and electrical stability. Hexagonal perovskites form an important new family of materials for obtaining novel ionic conductors with potential applications in a range of energy-related technologies.