The therapeutic effects of centrally acting pharmaceuticals can manifest gradually and unreliably in patients, making the drug discovery process slow and expensive. Biological markers providing early evidence for clinical efficacy could help prioritize development of the more promising drug candidates. A potential source of such markers is functional magnetic resonance imaging (fMRI), a noninvasive imaging technique that can complement molecular imaging. fMRI has been used to characterize how drugs cause changes in brain activity. However, variation in study protocols and analysis techniques has made it difficult to identify consistent associations between subtle modulations of brain activity and clinical efficacy. We present and validate a general protocol for functional imaging-based assessment of drug activity in the central nervous system. The protocol uses machine learning methods and data from multiple published studies to identify reliable associations between drug-related activity modulations and drug efficacy, which can then be used to assess new data. A proof-of-concept version of this approach was developed and is shown here for analgesics (pain medication), and validated with eight separate studies of analgesic compounds. Our results show that the systematic integration of multistudy data permits the generalized inferences required for drug discovery. Multistudy integrative strategies of this type could help optimize the drug discovery and validation pipeline.