But even when she was sleeping on trains and eating from dumpsters, Murray said she couldn't help wondering what would happen if she went back to school, got straight As.
"Could I change my life?" she said. "I was compelled to go back to school to find the answers to my what-if questions."
Completing her homework in stairwells, she would finish high school in two years and win a scholarship to Harvard University. Her story was made into a Lifetime movie, and in 2010 she released her memoir titled Breaking Night: A Memoir of Forgiveness, Survival and My Journey from Homeless to Harvard.
When her story became public, Murray said she was inspired by people she heard from, especially those she called "ordinary-extraordinary" for their ability to persevere beyond difficult circumstances.
They are "everyday people who decide to take challenges in life not as a cue to give up but as an opportunity to do something profoundly meaningful," she said. "Sometimes, adversity will wake you up."
She said she doesn't blame her parents for her upbringing.
"I believe they were sick. They taught me that people can't give you what they don't have. That was a great gift," she said. "Even in the dark periods of our lives, I believe there are gifts in what we come from, I believe there are blessings in the past."
She encouraged the record-breaking number of U. graduates to "stop and pause every now and again to realize how far you've come, how blessed you already are."
Student speaker Lauryn Paula Roth, meanwhile, expressed her gratitude to her community, which she counted as everyone from her family to her bus driver.
"I may not know what's next, but I owe the people in my community to do something relevant in our corner of the world," the science graduate said.
Economics graduate Mauricio Martin Caceres, who came to the U.S. five years ago, encouraged graduates to come up with their own speeches.
"What you have done today is amazing," he said, "and you deserve your words to make you feel that way."