An imaging method through a dynamic scattering medium is presented based on computational ghost imaging (CGI) and a convolutional neural network (CNN). The CNN is adopted to improve CGI quality, and its training set is obtained from numerical simulation rather than actual experiments, which greatly reduces the workload. A concise mathematical model is given to reflect the absorption and scattering effects of the dynamic medium. By adding Gaussian white noise with different intensities to the detected light intensity sequence, the undulation caused by dynamic scatterer is simulated, and then the network is trained under these conditions. Compared to the dataset without adding noise, our proposed method leads to a better performance of the trained network in imaging through a dynamic scattering medium, not only for the simple binary objects, but also the complex grayscale ones. The effectiveness of this method has been verified in experiments of scattering medium rotated at different speeds.