The risk was found to be highest for surgical patients who have migraines with aura, where there are warning signs before the onset of migraine, such as seeing flashing lights.
Experts say migraine should be included in an individual's risk assessment of stroke before undergoing surgery.
More than 50 million people undergo surgery in the USA and stroke is one potential complication. Stroke is responsible for around 6.2 million deaths yearly and is a leading cause of long term disability.
Migraines are often viewed as a benign condition, despite the increased risk of stroke, and have not been the focus of risk assessment at around the time of surgery.
So, Matthias Eikermann from Harvard Medical School and colleagues investigated whether surgical patients with migraine have an increased risk of stroke and whether this may lead to a higher hospital readmission rate.
They carried out a study of 124,558 surgical patients at Massachusetts General Hospital and two affiliated community hospitals between January 2007 and August 2014.
Patients were on average 52 years old, and just over half were women (54.5%).
Among the 124,558 surgical cases, 771 (0.6%) strokes occurred. Of all patients with stroke, 89 (11.5%) had migraine. Of these, 18 (2.3%) had migraine with aura and 71 (9.2%) had migraine without aura.
The researchers estimate that 2.4 strokes would be seen for every 1,000 surgical patients. This risk increases to 4.3 for every 1,000 patients with migraine diagnosis - 3.9 for migraine without aura, and 6.3 for migraine with aura.
The association remained after adjusting for disease and surgery factors such as age, sex and pre-existing vascular disease that may have increased risk of stroke.
In total, 10,088 patients were re-admitted to hospital within 30 days. The odds for readmission was 1.31 times higher for patients with a migraine than those without.
"Given the high prevalence of migraine in the general population, the migraine-perioperative ischemic stroke association carries public health importance" they explain.
"Physicians should be aware of this increased perioperative risk, particularly in patients with migraine who present without traditional risk factors for stroke."
They speculate that a genetic predisposition and an increased vulnerability to cerebral ischemia, where there isn't enough blood flow to the brain, may lead to heightened stroke risk in surgical patients with a history of migraine.
The authors say their findings suggest that high doses of drugs used to stabilize the blood pressure during surgery, known as vasopressors, as well as a pre-existing cardiac shunt - which allows blood to flow from the right heart to the left - may further increase the risk of stroke in patients with migraine.
"Future studies should focus on targeted investigation of these interactions and potential biologic mechanisms to provide urgently needed concepts of primary and secondary, as well as perioperative, stroke prevention in patients with migraine," they conclude.
Article: Migraine and risk of perioperative ischemic stroke and hospital readmission: hospital based registry study, Fanny P Timm, Timothy T Houle, Stephanie D Grabitz, Anne-Louise Lihn, Janne B Stokholm, Katharina Eikermann-Haerter, Ala Nozari, Tobias Kurth, Matthias Eikermann, The BMJ, doi: 10.1136/bmj.i6635, published 10 January 2017.