During the global fight against the novel coronavirus pneumonia (COVID-19) epidemic, accurate outbreak trend forecasting has become vital for outbreak prevention and control. Effective COVID-19 outbreak trend prediction remains a complex and challenging issue owing to the significant fluctuations in the COVID-19 data series. Most previous studies have limitations only using individual forecasting methods for outbreak modeling, ignoring the combination of the advantages of different prediction methods, which may lead to insufficient results. Therefore, this paper develops a novel ensemble paradigm based on multiple neural networks and a novel heuristic optimization algorithm. First, a new hybrid sine cosine algorithm-whale optimization algorithm (SCWOA) is exercised on 15 benchmark tests. Second, four neural networks are used as predictors for the COVID-19 outbreak forecasting. Each predictor is given a weight, and the proposed SCWOA is used to optimize the best matching weights of the ensemble model. The daily COVID-19 series collected from three of the most-affected countries were taken as the test cases. The experimental results demonstrate that different neural network models have different performances in various complex epidemic prediction scenarios. The SCWOA-based ensemble model can outperform all comparable models with its high accuracy and robustness.