There has recently been considerable interest in the stability of stochastic differential equations with Markovian switching, and a number of results have been achieved. However, due to the exponential sojourn time of Markovian chain at each state, there are many restrictions on existing results for practical application. In this paper, we explore the problem of stability in distribution of nonlinear systems with time-varying delays and semi-Markov switching. Unlike existing models, the new model takes into account noise, time-varying delays and semi-Markov switching. By means of stochastic analysis, functional analysis and inequality techniques, sufficient conditions are obtained to guarantee the stability of the systems concerned. The proposed results are new and extend existing ones.