Susan Page, a USA Today journalist and author of a new book Madam Speaker: Nancy Pelosi and the Lessons of Power, documented the House Speaker's decision.
Ms Pelosi felt she could retire once Hillary Clinton won the presidency, confident her policies would remain intact under the Democrat.
However, when Mr Trump defeated Ms Clinton, Ms Pelosi reportedly decided she had to remain in her position to try to safeguard Democratic policies.
Though Ms Pelosi was saddened that a woman - and a longtime personal friend - had failed to reach the highest office in American politics, she said her shock at Mr Trump's election went beyond issues of gender representation.
"That was saddening, but the election of Donald Trump was stunningly scary, and it was justified to be scared. How could they elect such a person – who talked that way about women, who was so crude and … to me, creepy,” she said.
Despite this, some of the individuals interviewed in the book doubted that Ms Pelosi would have gone through with her decision, even if Ms Clinton had won.
Ms Pelosi was long the highest-ranking woman in power in the US government until Kamala Harris took over as vice president.
The book recounts Ms Pelosi's initial interactions with Mr Trump the day after he was elected. She said they had a cordial phone call. She called him at Trump Towers and he picked up. She congratulated him and told him she looked forward to working with him, and he said he did as well.
“Nancy, me too,” Mr Trump said. “We’ll get some good things done.”
She recalled Mr Trump saying he had been a supporter of hers, and told her "I think you're terrific."
That optimism and goodwill did not last, however, as Mr Trump and Ms Pelosi went on to become bitter opponents throughout the entirety of his four-year stay in the White House.
It is unclear if Ms Pelosi has any plans to retire any time soon.
In 2018, Ms Pelosi pledged to step down as Speaker of the House after a group of Democrats threatened to vote her out. The Democrats involved agreed to have a caucus vote on installing term limits for the top three Democrats in office, and she agreed to abide by those limits even if the vote did not pass.
That caucus ultimately never happened due to government shutdowns, but Ms Pelosi said last year she intended to honour her agreement.
“What I said then is whether it passes or not, I will abide by those limits that are there,” Ms Pelosi said.