  We investigate higher-derivative extensions of Einstein-Maxwell theory that
are invariant under electromagnetic duality rotations, allowing for non-minimal
couplings between gravity and the gauge field. Working in a derivative
expansion of the action, we characterize the Lagrangians giving rise to
duality-invariant theories up to the eight-derivative level, providing the
complete list of operators that one needs to include in the action. We also
characterize the set of duality-invariant theories whose action is quadratic in
the Maxwell field strength but which are non-minimally coupled to the
curvature. Then we explore the effect of field redefinitions and we show that,
to six derivatives, the most general duality-preserving theory can be mapped to
Maxwell theory minimally coupled to a higher-derivative gravity containing only
four non-topological higher-order operators. We conjecture that this is a
general phenomenon at all orders, i.e, that any duality-invariant extension of
Einstein-Maxwell theory is perturbatively equivalent to a higher-derivative
gravity minimally coupled to Maxwell theory. Finally, we study charged black
hole solutions in the six-derivative theory and we investigate additional
constraints on the couplings motivated by the weak gravity conjecture.
