It is well known that if the moment in an I-beam is not constant throughout, the lateral–torsional buckling moment is greater than the same moment in pure bending. In other words, the value of moment-gradient factor (Cb) is always greater than unity. However, the effect of discontinuities in the cross section on the moment-gradient factor has not been studied, and it is not known whether the Cb factor given by AISC in Load and Resistance Factor Design Specification for Structural Steel Buildings can be applied to castellated beams. This paper develops a three-dimensional (3-D) finite-element model using ANSYS [User’s manual, version 5.4, ANSYS Inc, Houston, PA, 1998] for the inelastic nonlinear flexural–torsional analysis of castellated beams and uses it to investigate the effects of slenderness on the moment-gradient factor of simply supported castellated beams. It is found that the Cb factors given by AISC-LRFD are not accurate for the cases considered in this paper, in which castellated beam buckles inelastically. Therefore, instead of using a constant Cb factor for any of the cases, alternative equations for evaluating the Cb factor for each case in terms of the beam’s modified slenderness is proposed.