Since accurate rendering of soft shadows under environment lighting requires expensive computation to determine visibility from each pixel to hundreds of lights along omnidirectional directions, it brings great challenge to real-time rendering algorithm. Algorithms based on precomputation can provide accurate, real-time solutions, but it is hard to extend to dynamic scenes. Besides they have some inherent problems, for example, they usually need too much time on precomputation, cost too much memory, and can only be applied to limited types of light, etc. This paper proposes an importance-sampling-based real-time algorithm for all-frequency shadows rendering in dynamic scenes, which does not require any precomputation. Firstly, we sample some important lights which are decisive to the soft shadows from environment map; secondly we simplify the scene by geometric sampling so that we can respectively create a shadow map for each sampled light using only one rendering pass; thirdly we approximate the shadow test by using exponential function; and finally we accelerate the calculation by BRDF based on importance sampling. As a result, we are able to realize the real-time rendering of all-frequency shadows and environment mapping of dynamic scenes. Experiments demonstrate that the algorithm can support dynamic environment lights, dynamic objects and dynamic BRDFs; meanwhile it also can achieve real-time rendering results which are comparable to PRT algorithm.