"Our love of country requires us to respect the results of an election even when we don't like them or wish it had gone differently — the presidency doesn't belong to any one individual or any one party," she wrote. "To pretend that it does, to play along with these groundless conspiracy theories — whether for personal or political gain — is to put our country's health and security in danger."
"This isn't a game," she continued. "So I want to urge all Americans, especially our nation's leaders, regardless of party, to honor the electoral process and do your part to encourage a smooth transition of power, just as sitting presidents have done throughout our history."
The former first lady also recounted her own struggle to welcome Donald and Melania Trump to the White House after his 2016 win.
"Donald Trump had spread racist lies about my husband that had put my family in danger," she said, referencing Trump's baseless birther claims. "That wasn't something I was ready to forgive. But I knew that, for the sake of our country, I had to find the strength and maturity to put my anger aside."
She said she and then-President Barack Obama "instructed our staffs to do what George and Laura Bush had done for us: run a respectful, seamless transition of power — one of the hallmarks of American democracy" and "prepared detailed memos" for then-President-elect Trump's team.
"I have to be honest and say that none of this was easy for me," Obama wrote.
Still, she wrote, "I welcomed Melania Trump into the White House and talked with her about my experience, answering every question she had — from the heightened scrutiny that comes with being First Lady to what it's like to raise kids in the White House."
"I knew in my heart it was the right thing to do — because our democracy is so much bigger than anybody's ego," she said.
ABC News' Molly Nagle contributed to this report