Mormyrid electric fish are a model system for understanding how neural circuits predict the sensory consequences of motor acts. Medium ganglion cells in the electrosensory lobe create negative images that predict sensory input resulting from the fish's electric organ discharge (EOD). Previous studies have shown that negative images can be created through plasticity at granule cell-medium ganglion cell synapses, provided that granule cell responses to the brief EOD command are sufficiently varied and prolonged. Here we show that granule cells indeed provide such a temporal basis and that it is well-matched to the temporal structure of self-generated sensory inputs, allowing rapid and accurate sensory cancellation and explaining paradoxical features of negative images. We also demonstrate an unexpected and critical role of unipolar brush cells (UBCs) in generating the required delayed responses. These results provide a mechanistic account of how copies of motor commands are transformed into sensory predictions.