The network module-based method has been used for drug repositioning. The traditional drug repositioning method only uses the gene characteristics of the drug but ignores the drug-triggered metabolic changes. The metabolic network systematically characterizes the connection between genes, proteins, and metabolic reactions. The differential metabolic flux distribution, as drug metabolism characteristics, was employed to cluster the agents with similar MoAs (mechanism of action). In this study, agents with the same pharmacology were clustered into one group, and a total of 1309 agents from the CMap database were clustered into 98 groups based on differential metabolic flux distribution. Transcription factor (TF) enrichment analysis revealed the agents in the same group (such as group 7 and group 26) were confirmed to have similar MoAs. Through this agent clustering strategy, the candidate drugs which can inhibit (Japanese encephalitis virus) JEV infection were identified. This study provides new insights into drug repositioning and their MoAs.