Inclusion Criteria:  A history of migraine with or without aura consistent with a diagnosis according to the International Classification of Headache Disorders (ICHD-3) for at least 6 months. By history, the participant's migraines typically last between 3 and 72 hours if untreated or treated unsuccessfully and migraine episodes are separated by at least 48 hours of headache pain freedom. History of 1 to 14 migraine attacks per month with moderate to severe headache in each of the 2 months prior to screening (Visit 1). Current or past use of at least 1 oral medication (over-the-counter medication or prescription medication) for the acute treatment of migraine. For main study participants, treatment of a qualifying migraine with single-blind placebo during the screening period and completion of 2-hour headache pain assessment. Weight is ≥ 20 kg (44 pounds) and < 135 kg (298 pounds) Per investigator judgment, participant is able to swallow or can learn to swallow study intervention. The participant is able to understand and complete the study questionnaires and eDiary. Participants who need assistance with reading the assessments may be assisted by a parent or guardian.  Exclusion Criteria:  Any clinically significant hematologic, endocrine, pulmonary, renal, hepatic, gastrointestinal, cardiovascular or neurologic disease. In the opinion of the investigator, other confounding pain syndromes, confounding psychiatric conditions, or other significant neurological disorders other than migraine. History of malignancy in the 5 years prior to Visit 1. History of any prior gastrointestinal conditions (eg, diarrhea syndromes, inflammatory bowel disease) that may affect the absorption or metabolism of the study intervention. Significant risk of self-harm, based on clinical interview and responses on the Columbia-Suicide Severity Rating Scale (C-SSRS), or of harm to others; participants must be excluded if they report suicidal ideation with intent, with or without a plan, (ie, Type 4 or 5 on the C-SSRS) in the past 6 months or report suicidal behavior in the last 6 months prior to Visit 1 or Visit 2 assessments. At Visit 1, current alcohol or drug abuse or dependence per investigator's judgment. For main study participants, no headache at the 2-hour post dose assessment after taking single-blind placebo for a qualifying migraine during screening period (ie, placebo responder). A current diagnosis of chronic migraine as defined by ICHD-3 Participants who overuse medication for migraine defined as use of opioids or barbiturates > 2 days/month, triptans or ergots ≥ 10 days/month, simple analgesics (eg, aspirin, NSAIDs, acetaminophen) ≥ 15 days/month or any combination of triptans, ergots, or simple analgesics (eg, aspirin, NSAIDs, acetaminophen) ≥ 10 days/month in the 3 months prior to Visit 1 per investigator's judgment. Difficulty distinguishing migraine headache from tension-type or other headaches. Has a history of migraine aura with diplopia or impairment of level of consciousness, hemiplegic migraine, or retinal migraine as defined by ICHD-3. Has a current diagnosis of new persistent daily headache, trigeminal autonomic cephalgia (eg, cluster headache), or painful cranial neuropathy as defined by ICHD-3 Required in-hospital (excluding emergency department visits) treatment for migraines 3 or more times in the 6 months prior to Visit 1. Requirement for any medication (eg, barbiturates) or diet (eg, grapefruit juice) that is on the list of prohibited concomitant medications that cannot be discontinued or switched to an allowable, alternative medication at Visit 1. Previous exposure, within the last 6 months, to injectable monoclonal antibodies blocking the calcitonin gene-related peptide (CGRP) pathway History of hypersensitivity or clinically significant adverse reaction to a CGRP receptor antagonist or hypersensitivity to any component of the study interventions, ubrogepant or placebo. Currently participating or has participated in a study with an investigational compound or device within 30 days prior to Visit 1