Recent studies have been demonstrated that the excessive inflammatory response is an important factor of death in COVID-19 patients. In this study, we proposed a network representation learning-based methodology, termed AIdrug2cov, to discover drug mechanism and anti-inflammatory response for patients with COVID-19. This work explores the multi-hub characteristic of a heterogeneous drug network integrating 8 unique networks. Inspired by the multi-hub characteristic, we design three billion special meta paths to train a deep representation model for learning low-dimensional vectors that integrate long-range structure dependency and complex semantic relation among network nodes. Using the representation vectors, AIdrug2cov identifies 40 potential targets and 22 high-confidence drugs that bind to tumor necrosis factor(TNF)-α or interleukin(IL)-6 to prevent excessive inflammatory responses in COVID-19 patients. Finally, we analyze mechanisms of action based on PubMed publications and ongoing clinical trials, and explore the possible binding modes between the new predicted drugs and targets via docking program. In addition, the results in 5 pharmacological application suggested that AIdrug2cov significantly outperforms 5 other state-of-the-art network representation approaches, future demonstrating the availability of AIdrug2cov in drug development field. In summary, AIdrug2cov is practically useful for accelerating COVID-19 therapeutic development. The source code and data can be downloaded from https://github.com/pengsl-lab/AIdrug2cov.git.