Scroll waves in a quasi-three-dimensional reaction-diffusion medium with a gradient in the third dimension are studied by numerical simulations using the Fitzhugh-Nagumo model. Under a simple initial condition with only one straight filament, we show a spontaneous creation of twisted scroll rings surrounding the initial filament when the control parameter is increased across a threshold. We find that due to the presence of the gradient, the difference of oscillation frequencies in the third dimension is the underlying cause of the phenomenon. Further increase of the control parameter will lead to the spiral breakups, as a result of the interaction of filaments. Observations in the experiments conducted in the same type of medium with the Belousov-Zhabotinsiky reaction qualitatively agree with our simulation results.