A theoretical model considering the distribution of the grain sizes and grain-boundary ledges was developed for cavity nucleation in creeping ceramics containing viscous grain boundary phase. The critical stress involving the effects of various shapes of cavities and viscosity coefficient (η) for cavity nucleation was presented. Then, the local stress concentration factor concerning different distributions of grain-boundary ledges was calculated and discussed. The results showed that various shapes of cavities and η are not the main influencing factors on the critical stress. The stress concentration factor increases with the increase of grain-boundary ledge size or the density. Therefore, it would be liable to cause cavity nucleation at gain boundary when the density of grain-boundary ledges is high and the size is large.