The ongoing Coronavirus Disease 2019 (COVID-19) pandemic threatens the health of humans and causes great economic losses. Predictive modeling and forecasting the epidemic trends are essential for developing countermeasures to mitigate this pandemic. We develop a network model, where each node represents an individual and the edges represent contacts between individuals where the infection can spread. The individuals are classified based on the number of contacts they have each day (their node degrees) and their infection status. The transmission network model was respectively fitted to the reported data for the COVID-19 epidemic in Wuhan (China), Toronto (Canada), and the Italian Republic using a Markov Chain Monte Carlo (MCMC) optimization algorithm. Our model fits all three regions well with narrow confidence intervals and could be adapted to simulate other megacities or regions. The model projections on the role of containment strategies can help inform public health authorities to plan control measures.