A magnetic resonance imaging apparatus according to an embodiment includes processing circuitry and sequence control circuitry. The processing circuitry sets a pattern based on information on heartbeats or pulsebeats of a subject, the pattern being an imaging condition of a pulse sequence for collecting data at a plurality of timings along a relaxation curve of longitudinal magnetization in synchronization with heartbeats or pulsebeats and the pattern defining a relation between heartbeats or pulsebeats, an inversion pulse, and a data collection timing. The sequence control circuitry controls execution of the pulse sequence according to the pattern.