Real-time flood forecasting is one of the most pivotal measures for flood management, and real-time error correction is a critical step to guarantee the reliability of forecasting results. However, it is still challenging to develop a robust error correction technique due to the limited cognitions of catchment mechanisms and multi-source errors across hydrological modeling. In this study, we proposed a hydrologic similarity-based correction (HSBC) framework, which hybridizes hydrological modeling and multiple machine learning algorithms to advance the error correction of real-time flood forecasting. This framework can quickly and accurately retrieve similar historical simulation errors for different types of real-time floods by integrating clustering, supervised classification, and similarity retrieval methods. The simulation errors “carried” by similar historical floods are extracted to update the real-time forecasting results. Here, combining the Xin'anjiang model-based forecasting platform with k-means, K-nearest neighbor (KNN), and embedding based subsequences matching (EBSM) method, we constructed the HSBC framework and applied it to China's Dufengkeng Basin. Three schemes, including “non-corrected” (scheme 1), “auto-regressive (AR) corrected” (scheme 2), and “HSBC corrected” (scheme 3), were built for comparison purpose. The results indicated the following: 1) the proposed framework can successfully retrieval similar simulation errors with a considerable retrieval accuracy (2.79) and time consumption (228.18 s). 2) four evaluation metrics indicated that the HSBC-based scheme 3 performed much better than the AR-based scheme 2 in terms of both the whole flood process and the peak discharge; 3) the proposed framework overcame the shortcoming of the AR model that have poor correction for the flood peaks and can provide more significant correction for the floods with bad forecasting performance. Overall, the HSBC framework demonstrates the advancement of benefiting the real-time error correction from hydrologic similarity theory and provides a novel methodological alternative for flood control and water management in wider areas.