First, I think your plant has been mis-identified. It looks like a Euphorbia, not a Fairy Castle Cactus. When you cut it, did it leak white sap?
When you cut the brown part off, did you cut enough that the cut edge was completely greenish whitish all the way across? If there was brown down the middle, you didn't cut far enough. The problem is, whatever caused the rot could be from the roots or it could be the tip.