Pelosi was born in Baltimore to an Italian-American family. She was the only girl and the youngest of seven children of Annunciata M. "Nancy" D'Alesandro (née Lombardi) and Thomas D'Alesandro Jr., who both had Italian roots.

Pelosi was involved with politics from an early age. She helped her father at his campaign events. She attended John F. Kennedy's inaugural address when he was sworn in as U.S. president in January 1961.

Nancy graduated from the Institute of Notre Dame, an all-girls Catholic high school in Baltimore. In 1962, she graduated from Trinity College in Washington, D.C. with a Bachelor of Arts in political science. Pelosi interned for Senator Daniel Brewster (D-Maryland) in the 1960s alongside future House majority leader Steny Hoyer.

She met Paul Frank Pelosi while she was attending college. They married in Baltimore at the Cathedral of Mary Our Queen on September 7, 1963. Nancy and Paul Pelosi have five children: Nancy Corinne, Christine, Jacqueline, Paul, and Alexandra, as well as nine grandchildren.

Pelosi's brother, Thomas D'Alesandro III, also a Democrat, was Mayor of Baltimore from 1967 to 1971.

After the couple married, they moved to New York, and then to San Francisco in 1969, where Paul Pelosi's brother, Ronald Pelosi, was a member of the City and County of San Francisco's Board of Supervisors.

After moving to San Francisco, Pelosi became friends with 5th District congressman Phillip Burton, and began working her way up in Democratic politics. In 1976, she was elected as a Democratic National Committee member from California, a position she would hold until 1996.

Nancy was elected as party chair for Northern California in January 1977, and four years later was selected to head the California Democratic Party, which she led until 1983.

Phillip Burton died in 1983 and was succeeded by his wife, Sala. In late 1986, Sala became ill with cancer and decided not to run for reelection in 1988. She picked Pelosi as her designated successor, guaranteeing her the support of the Burtons' contacts.

Pelosi served as the San Francisco Democratic National Convention Host Committee chairwoman in 1984, and then as Democratic Senatorial Campaign Committee finance chair from 1985 to 1986.

Sala died on February 1, 1987, just a month after being sworn in for a second full term.

Pelosi won the special election to succeed Sala, narrowly defeating San Francisco supervisor Harry Britt on April 7, 1987, then easily defeating Republican candidate Harriet Ross on June 2, 1987; Pelosi took office a week later.

In 2001, Pelosi was elected the House minority whip, second-in-command to Minority Leader Dick Gephardt of Missouri. She was the first woman in U.S. history to hold that post.

In 2002, after Gephardt resigned as minority leader to seek the Democratic nomination in the 2004 presidential election, Pelosi was elected to replace him, becoming the first woman to lead a major party in the House.

Pelosi voted against the Secure Fence Act of 2006.

In the 2006 midterm elections, the Democrats took control of the House, picking up 30 seats.

On November 16, 2006, the Democratic caucus unanimously chose Pelosi as the Democratic candidate for speaker.

On January 3, Pelosi defeated Republican John Boehner of Ohio with 233 votes compared to his 202 votes in the election for speaker of the House.

On January 5, 2007, reacting to suggestions from President Bush's confidantes that he would increase troop levels in Iraq (which he announced in a speech a few days later), Pelosi joined with Senate Majority Leader Harry Reid to condemn the plan.

In mid-October 2007, after the House Foreign Affairs Committee passed a resolution to label the 1915 killing of Armenians by Ottoman Turks as genocide, Pelosi pledged to bring the measure to a vote.

Pelosi was named Permanent Chair of the 2008 Democratic National Convention in Denver, Colorado.

Pelosi was re-elected speaker in 2009.

Pelosi supported the NATO-led military intervention in Libya in 2011. She also favored arming Syria's rebel fighters.

Though Pelosi was re-elected by a comfortable margin in the 2010 midterm elections, the Democrats lost 63 seats and ceded control of the House of Representatives to the Republicans. After the electoral setback suffered by her party, Pelosi sought to continue leading the House Democratic Caucus in the position of minority leader, the office she held prior to becoming speaker. After Pelosi's disparate intra-party opposition failed to pass a motion to delay the leadership vote, Pelosi was elected minority leader for the 112th Congress. On November 14, 2012, Pelosi announced she would remain on as Democratic leader.

In August 2016, Pelosi said her personal contact information was posted online following a cyber attack against top Democratic campaign committees and she had received "obscene and sick calls, voice mails and text messages". She warned members of Congress to avoid letting children or family members answer phone calls or read text messages.

Tim Ryan initiated a bid to replace Pelosi as House minority leader on November 17, 2016, prompted by colleagues following the 2016 presidential election. After Pelosi agreed to give more leadership opportunities to junior members, she defeated Ryan by a vote of 134–63 on November 30.

In 2017, after Democrats lost four consecutive special elections in the House of Representatives, Pelosi's leadership was again called into question. On June 22, 2017, a small group of House Democrats held a closed-door meeting in the office of Representative Kathleen Rice (NY) to discuss a strategy for selecting new Democratic leadership. Rice publicly called for new Democratic leadership in the House of Representatives, as did other House Democrats, including Tim Ryan (OH), Seth Moulton (MA), and Filemon Vela (TX). Cedric Richmond (LA), Chairman of the Congressional Black Caucus, also attended the closed-door meeting on Pelosi. Rice said in a CNN interview about Pelosi's leadership, "If you were talking about a company that was posting losing numbers, if you were talking about any sports team that was losing time and time again, changes would be made, right? The CEO out. The coach would be out and there would be a new strategy put in place." In a press conference, Pelosi responded to the criticism by saying, "I respect any opinion that my members have but my decision about how long I stay is not up to them." When asked specifically why she should stay on as House minority leader after numerous Democratic seats were lost, Pelosi responded, "Well, I'm a master legislator. I am a strategic, politically astute leader. My leadership is recognized by many around the country, and that is why I'm able to attract the support that I do".

In August 2017, following Trump's warning that North Korea "will be met with fire and fury like the world has never seen" in the event of further threats to the United States, Pelosi said the comments were "recklessly belligerent and demonstrate a grave lack of appreciation for the severity of the North Korean nuclear situation. His saber-rattling and provocative, impulsive rhetoric erode our credibility".

In November 2017, after Pelosi called for the resignation of John Conyers over allegations of harassment, she convened the first in a series of planned meetings on strategies to address reforming workplace policies in the wake of national attention to sexual harassment. Pelosi said Congress had "a moral duty to the brave women and men coming forward to seize this moment and demonstrate real, effective leadership to foster a climate of respect and dignity in the workplace".

In November 2017, after the Pentagon sent a letter to lawmakers stating a ground invasion was the only way to destroy all North Korea's nuclear weapons without concern for having missed any, Pelosi said she was concerned about Pyongyang's selling nuclear technology to third parties and called for the United States to "exhaust every other remedy".

In February 2018, Pelosi sent a letter to Speaker Ryan accusing Republicans with having waged a "cover-up campaign" to protect Trump and cited last minute changes to the memo after a vote for its release as dangerous and violating House rules, saying, "House Republicans' pattern of obstruction and cover-up to hide the truth about the Trump-Russia scandal represents a threat to our intelligence and our national security. The GOP has led a partisan effort to distort intelligence and discredit the U.S. law enforcement and intelligence communities." She charged House Intelligence Committee Chairman Devin Nunes with partaking in "deliberately dishonest actions" and called for his immediate removal from his position.

In May 2018, after the White House invited two Republicans and no Democrats to a briefing by Department of Justice officials on an FBI informant who had made contact with the Trump campaign, Pelosi and Senate minority leader Schumer sent a letter to Deputy Attorney General Rod Rosenstein and FBI director Wray calling for "a bipartisan Gang of Eight briefing that involves congressional leadership from both chambers".

In June 2018, after Trump praised North Korean leader Kim Jong-un, Pelosi said in a statement, "In his haste to reach an agreement, President Trump elevated North Korea to the level of the United States while preserving the regime's status quo".

In August 2018, Pelosi called for the resignation of Duncan D. Hunter after his indictment on charges of misusing at least $250,000 in campaign funds, saying the charges were "evidence of the rampant culture of corruption among Republicans in Washington today".

In the 2018 midterm elections, the Democrats regained a majority of seats in the House.

On November 28, House Democrats nominated Pelosi to once again serve as speaker of the House.

She was formally re-elected to the speakership at the start of the 116th Congress on January 3, 2019. Pelosi "clinched the speakership after weeks of whittling down opposition from some fellow Democrats seeking a new generation of leadership. The deal to win over holdouts put an expiration date on her tenure: she promised not to stay more than four years in the job". Two hundred twenty House Democrats voted to elect Pelosi speaker, while 15 other House Democrats cast their ballots for someone else or voted present.

At the start of the 116th Congress, Pelosi opposed President Trump's attempts to use the 2018–19 federal government shutdown (which she called a "hostage-taking" of civil servants) as leverage to build a substantial wall on the American border. Pelosi declined to allow Trump to give the State of the Union Address in the House of Representatives chamber while the shutdown was ongoing. After several news polls showed Trump's popularity sharply falling due to the shutdown, on January 25, 2019, Trump signed a stopgap bill to reopen the government without any concessions regarding a border wall for three weeks up until February 15 to allow for negotiations to take place to approve an appropriations bill that both parties could agree on. However, Trump reiterated his demand for the border wall funding and said he would shut down the government again or declare a national emergency and use military funding to build the wall if Congress did not appropriate the funds by February 15, reopening the federal government .

In January 2019, Pelosi criticized President Trump's planned withdrawal of U.S. troops from Syria and Afghanistan. She called Trump's announcement a "Christmas gift to Vladimir Putin".

On February 15, 2019, President Trump declared a national emergency in order to bypass the United States Congress, after being unsatisfied with a bipartisan border bill which had passed the House of Representatives and the Senate a day before.

On February 4, 2020, at the conclusion of President Trump's State of the Union, Pelosi tore up her official copy of his speech. Her stated reason for doing so was "because it was a courteous thing to do considering the alternatives. It was a such a dirty speech." She was criticized for this by President Trump and Republicans.