Since ketamine was approved by the FDA as an intravenous anesthetic, it has been in clinical use for more than 50 years. Apart from its anesthetic effects, ketamine is one of the few intravenous anesthetics with potent analgesic properties. As part of the effort to develop pain management, renewed interest has focused on the use of ketamine for the treatment of acute and chronic pain. Ketamine is commonly used to treat various kinds of chronic pain syndromes and is also applied to control perioperative pain and reduce the consumption of postoperative analgesics. However, its precise mechanisms of action remain mysterious for a large part. Despite extensive research in the field, the mechanism of ketamine is still unclear. Its analgesic effect appears to be largely mediated by blockade of NMDARs, but opioid, GABA, and monoaminergic system seem to partly participate in the pain transmission procedure. Its metabolites also have an analgesic effect, which may prolong pain relief. More recently, the antidepressant effect of ketamine has been considered to reduce pain-related aversion to relieve chronic pain. Overall, the analgesic mechanism of ketamine seems to be a complex combination of multiple factors. Due to its potent analgesic properties, ketamine is an analgesic with great clinical application prospects. Exploring the precise mechanism of action of ketamine will help guide clinical medication and confirm indications for ketamine analgesia. This review aims to list the application of ketamine in pain management and discuss its analgesic mechanism.