It had to be dry and not fresh (out from soil one or two weeks). Put in plain light but not in sun, nor partial.
In a clay pot, wide and deep, typically from 5-10 liters, with this root in the center and in depth, taking care to cover it with universal soil.
The watering must be regular and especially whenever the soil is dry, but avoiding stagnation of water in the saucer that would lead to the emergence of fungal plant diseases known as root rot.
That, if you are sure that your ginger was healthy. Maybe it was not.
EDIT @ (just learned how answering to comments)
Rhizomes have to be very dry.
It works like the cuttings of succulents. When you divide the rhizomes of ginger, one part is "wound", ie open to infections. As with cacti, you have to wait several days before burying. The "wound" has to dry thoroughly.
Likewise, the rhizome of the ginger, which is fleshy, has to dry for some weeks before to be buryed. Even better, like cacti, put it in the ground and wait at least a few days before watering.