It was created by British start-up Exscientia and Japanese pharmaceutical firm Sumitomo Dainippon Pharma.
The drug will be used to treat patients who have obsessive-compulsive disorder (OCD).
Typically, drug development takes about five years to get to trial, but the AI drug took just 12 months.
Exscienta chief executive Prof Andrew Hopkins described it as a “key milestone in drug discovery”.
He told the BBC: “We have seen AI for diagnosing patients and for analysing patient data and scans, but this is a direct use of AI in the creation of a new medicine.”
The molecule – known as DSP-1181 – was created by using algorithms that sifted through potential compounds, checking them against a huge database of parameters.
“There are billions of decisions needed to find the right molecules and it is a huge decision to precisely engineer a drug,” said Prof Hopkins.
“But the beauty of the algorithm is that they are agnostic, so can be applied to any disease,” he added.