Harmful algal blooms (HABs) cause environmental problems worldwide. Continuous monitoring and forecasting of harmful algal blooms are necessary for marine resources managers to detect the intensity and spatial extent of HABs and provide early warnings to the public. In this study, we introduce an integrated web-based system for the monitoring and forecasting of coastal HABs. The system is named the Harmful Algal Blooms Monitoring and Forecasting System (HMFS). HMFS integrates in situ observations, a remote-sensing-based model, hydrodynamic and water quality model and Web-Based Geographic Information System (GIS) techniques into one environment. The in situ sensors and remote sensing model provide automatic and continuous monitoring of the coastal water conditions. The numerical models provide short-term prediction and early warning of HAB of up to 5 days. The overall forecast accuracy is more than or equal to 50% for the major coastal areas of Shenzhen in 2018. By leveraging a web-based GIS technique and Service-Oriented Architecture (SOA), the web portal of HMFS provides a graphic interface for users and mangers to view real-time in situ measurements and remote sensing maps, explore numerical model forecasts and get early warning information. HMFS was applied to Shenzhen, which is a rising megacity in Southern China. The application study demonstrated the applicability and effectiveness of HMFS for monitoring and predicting HABs.