On 13 August 2014, Mirzakhani was honored with the Fields Medal, the most prestigious award in mathematics. Thus, she became both the first woman and the first Iranian to be honored with the award. The award committee cited her work in "the dynamics and geometry of Riemann surfaces and their moduli spaces".

On 14 July 2017, Mirzakhani died of breast cancer at the age of 40.

Mirzakhani was born on 3 May 1977 in Tehran, Iran. Her father Ahmad is an electrical engineer. She attended Tehran Farzanegan School there, part of the National Organization for Development of Exceptional Talents (NODET). In 1994, Mirzakhani achieved the gold medal level in the International Mathematical Olympiad, the first female Iranian student to do so. In the 1995 International Mathematical Olympiad, she became the first Iranian student to achieve a perfect score and to win two gold medals.

She obtained her BSc in mathematics in 1999 from the Sharif University of Technology. She then went to the United States for graduate work, earning her Ph.D. in 2004 from Harvard University, where she worked under the supervision of the Fields Medalist Curtis T. McMullen. At Harvard she is said to have been "distinguished by ... determination and relentless questioning", despite not being a native English-speaker. She used to take her class notes in Persian.

Mirzakhani was a 2004 research fellow of the Clay Mathematics Institute and a professor at Princeton University. In 2008, she became a professor at Stanford University.

Mirzakhani made several contributions to the theory of moduli spaces of Riemann surfaces. In her early work, Mirzakhani discovered a formula expressing the volume of the moduli space of surfaces of type (g,n) with given boundary lengths as a polynomial in those lengths. This led her to obtain a new proof for the formula discovered by Edward Witten and Maxim Kontsevich on the intersection numbers of tautological classes on moduli space, as well as an asymptotic formula for the growth of the number of simple closed geodesics on a compact hyperbolic surface, generalizing the theorem of the three geodesics for spherical surfaces. Her subsequent work focused on Teichmüller dynamics of moduli space. In particular, she was able to prove the long-standing conjecture that William Thurston's earthquake flow on Teichmüller space is ergodic.

Most recently as of 2014, with Alex Eskin and with input from Amir Mohammadi, Mirzakhani proved that complex geodesics and their closures in moduli space are surprisingly regular, rather than irregular or fractal. The closures of complex geodesics are algebraic objects defined in terms of polynomials and therefore they have certain rigidity properties, which is analogous to a celebrated result that Marina Ratner arrived at during the 1990s. The International Mathematical Union said in its press release that "It is astounding to find that the rigidity in homogeneous spaces has an echo in the inhomogeneous world of moduli space."

Mirzakhani was awarded the Fields Medal in 2014 for "her outstanding contributions to the dynamics and geometry of Riemann surfaces and their moduli spaces". The award was made in Seoul at the International Congress of Mathematicians on 13 August. At the time of the award, Jordan Ellenberg explained her research to a popular audience:

[Her] work expertly blends dynamics with geometry. Among other things, she studies billiards. But now, in a move very characteristic of modern mathematics, it gets kind of meta: She considers not just one billiard table, but the universe of all *possible* billiard tables. And the kind of dynamics she studies doesn't directly concern the motion of the billiards on the table, but instead a transformation of the billiard table itself, which is changing its shape in a rule-governed way; if you like, the table itself moves like a strange planet around the universe of all possible tables ... This isn't the kind of thing you do to win at pool, but it's the kind of thing you do to win a Fields Medal. And it's what you need to do in order to expose the dynamics at the heart of geometry; for there's no question that they're there.

In 2014, President Hassan Rouhani of Iran congratulated her for winning the topmost world mathematics prize.

Mirzakhani has an Erdős number of 3.

In 2005, Mirzakhani married Jan Vondrák, a Czech theoretical computer scientist and applied mathematician who currently is an associate professor at Stanford University. They have a daughter named Anahita. Mirzakhani lived in Palo Alto, California.

Mirzakhani described herself as a "slow" mathematician, saying that "you have to spend some energy and effort to see the beauty of math." To solve problems, Mirzakhani would draw doodles on sheets of paper and write mathematical formulas around the drawings. Her daughter described her mother's work as "painting".

She declared:

I don't have any particular recipe [for developing new proofs] ... It is like being lost in a jungle and trying to use all the knowledge that you can gather to come up with some new tricks, and with some luck, you might find a way out.

Mirzakhani was diagnosed with breast cancer in 2013. In 2016, the cancer spread to her bones and liver, and she died on 14 July 2017 at the age of 40 at Stanford Hospital in Stanford, California.

Iranian president Hassan Rouhani and other officials published condolences messages and praised Mirzakhani's scientific achievements. Rouhani said in his message that "unprecedented brilliance of this creative scientist and modest human being, who made Iran's name resonate in the world's scientific forums, was a turning point in showing the great will of Iranian women and young people on the path towards reaching the peaks of glory and in various international arenas." Sharif University of Technology, the place where Mirzakhani studied, announced that its faculty of mathematics will be renamed to "Mirzakhani".

Upon her death, several Iranian newspapers, along with Iranian President Hassan Rouhani, broke taboo and published photographs of Mirzakhani with her hair uncovered, a gesture that was widely noted in the press and on social media. Mirzakhani's death has also renewed debates within Iran regarding matrilineal citizenship for children of mixed-nationality parentage; Fars News Agency reported that, on the heels of Mirzakhani's death, 60 Iranian MPs urged the speeding up of an amendment to a law that would allow children of Iranian mothers married to foreigners to be given Iranian nationality, in order to make it easier for Mirzakhani's daughter to visit Iran. Mirzakhani had previously applied for citizenship for her daughter.

Numerous obituaries and tributes were published in the days following Maryam Mirzakhani's death.

Gold medal. International Mathematical Olympiad (Hong Kong 1994)
Gold medal. International Mathematical Olympiad (Canada 1995)
IPM Fellowship, Tehran, Iran, 1995–1999
Merit fellowship Harvard University, 2003
Harvard Junior Fellowship Harvard University, 2003
Clay Mathematics Institute Research Fellow 2004
AMS Blumenthal Award 2009
Invited to talk at the International Congress of Mathematicians in 2010, on the topic of "Topology and Dynamical Systems & ODE"
The 2013 AMS Ruth Lyttle Satter Prize in Mathematics. "Presented every two years by the American Mathematical Society, the Satter Prize recognizes an outstanding contribution to mathematics research by a woman in the preceding six years. The prize was awarded on 10 January 2013, at the Joint Mathematics Meetings in San Diego."
Simons Investigator Award 2013
Named one of *Nature* magazine's ten "people who mattered" of 2014
Clay Research Award 2014
Plenary speaker at the International Congress of Mathematicians (ICM 2014)
Fields Medal 2014
Elected foreign associate to the French Academy of Sciences in 2015
Elected to the American Philosophical Society in 2015
National Academy of Sciences 2016
Elected to the American Academy of Arts and Sciences in 2017