  Magnetism typically arises from the joint effect of Fermi statistics and
repulsive Coulomb interactions, which favors ground states with non-zero
electron spin. As a result, controlling spin magnetism with electric fields---a
longstanding technological goal in spintronics and multiferroics---can be
achieved only indirectly. Here, we experimentally demonstrate direct electric
field control of magnetic states in an orbital Chern insulator, a magnetic
system in which non-trivial band topology favors long range order of orbital
angular momentum but the spins are thought to remain disordered. We use van der
Waals heterostructures consisting of a graphene monolayer rotationally faulted
with respect to a Bernal-stacked bilayer to realize narrow and topologically
nontrivial valley-projected moir\'e minibands. At fillings of one and three
electrons per moir\'e unit cell within these bands, we observe quantized
anomalous Hall effects with transverse resistance approximately equal to
$h/2e^2$, which is indicative of spontaneous polarization of the system into a
single-valley-projected band with a Chern number equal to two. At a filling of
three electrons per moir\'e unit cell, we find that the sign of the quantum
anomalous Hall effect can be reversed via field-effect control of the chemical
potential; moreover, this transition is hysteretic, which we use to demonstrate
nonvolatile electric field induced reversal of the magnetic state. A
theoretical analysis indicates that the effect arises from the topological edge
states, which drive a change in sign of the magnetization and thus a reversal
in the favored magnetic state. Voltage control of magnetic states can be used
to electrically pattern nonvolatile magnetic domain structures hosting chiral
edge states, with applications ranging from reconfigurable microwave circuit
elements to ultralow power magnetic memory.
