Teva agreed to pay Heptares $10m upfront, and potentially up to $400m in payments tied to achieving research, development, and commercialization milestones.
Heptares is also eligible to receive royalties on net sales of products resulting from the collaboration.
Teva will receive worldwide development and commercial rights to new CGRP antagonists co-developed by Heptares.
Teva president of global R&D and chief scientific officer Michael Hayden said: "CGRP antagonism represents an exciting opportunity to treat migraine.
"We believe small-molecule CGRP antagonists offer further opportunities that are highly complementary to our promising candidate, TEV-48125, an anti-CGRP antibody."
CGRP is released during migraine attacks. It is identified in small to medium-sized neurons in the trigeminal ganglion and mediates its activity via G protein-coupled receptors situated throughout the body.
About 36 million people in the US and 8 million people in Japan suffer from migraine, which is defined as recurring attacks of moderate to severe headache pain.
Migraine is three times more common in women than in men and affects over 10% of people globally.