An electromagnetic memory effect in Y-Ba-Cu-O system is studied. In the measurement of current-voltage characteristics, a voltage drop across the superconducting sample is observed on applying an external magnetic field. The voltage drop continues to appear after the removal of the magnetic field. This phenomenon is considered as a nonvolatile memory effect. The voltage drop increases with increase in applied magnetic flux, but it becomes constant at about 10-2T. The appearance of the voltage drop is ascribed to the trapping of magnetic flux. Depending on the direction of applied magnetic flux less than 2×10-3T, the voltage drop in the memorized sample increases or decreases. The fact that the material used is porous and contains many grain boundaries suggests a junglegym-like path in a current flow model. The mechanism of the memory effect can be explained by applying this model.