Facebook CEO and Harvard dropout Mark Zuckerberg, center, smiles as he is introduced before being presented with an honorary Doctor of Laws degree as Baylor College of Medicine professor Huda Zoghbi, left, and actor James Earl Jones, second from left, applaud during Harvard University commencement exercises, Thursday, May 25, 2017, in Cambridge, Mass. (AP Photo/Steven Senne)

Mark Zuckerberg returned Thursday to Harvard, where he launched Facebook and then dropped out, telling graduates it's up to them to bring purpose to the world, fight inequality and strengthen the global community.

"Change starts local. Even global changes start small—with people like us," the Facebook CEO said. He shared stories about graduates such as David Razu Aznar, a former city leader who led the effort to legalize gay marriage in Mexico City, and Agnes Igoye, who grew up in conflict zones in Uganda and now trains law enforcement officers.

"And this is my story too," Zuckerberg added. "A student in a dorm room, connecting one community at a time, and keeping at it until one day we can connect the whole world."

Such lofty talk now comes naturally to Zuckerberg, a 33-year-old billionaire who has committed to giving away nearly all of his wealth. In February, he sketched out an ambitious, if vague, vision for Facebook that committed the company to developing "social infrastructure" that would help build a "global community that works for all of us."

But it also strikes a sharp contrast with the criticism Facebook has taken recently—not so much for connecting the world (a big chunk of it, anyway) as for failing to anticipate how vulnerable that connectedness could be to those who abuse it.

JOURNEY BACK

Zuckerberg, who like the graduates is a millennial, started Facebook in his dorm room in 2004. What began as a closed networking site for Harvard students is now a global communications force with nearly 2 billion members. Facebook's founding was the subject of a Hollywood movie, "The Social Network," in 2010.

Facebook's effect has been profound. It has connected people who would have never met otherwise, letting them form supportive networks online and offline. And it has allowed people to communicate in developing countries even if they don't have a phone number or a smartphone.

But it has also served to spread misinformation bordering on propaganda, hateful views and bullying, reflecting the worst parts of humanity back to us.

In his commencement speech, in interviews and in his February manifesto, Zuckerberg is decidedly optimistic about all that. He's been saying he wants to make the world more open and connected for more than a decade now, and he doesn't relent.

HIGHER PURPOSE

He told the graduates how, when Facebook's investors and executives wanted him to sell the company early on, he resisted. "You see, my hope was never to build a company, but to make an impact," he said. But as a young CEO, he never explained this to his co-workers, and the subsequent fight "tore our company apart."

"I wondered if I was just wrong, an impostor, a 22 year-old kid who had no idea how the world worked," Zuckerberg said. "Now, years later, I understand that is how things work with no sense of higher purpose. It's up to us to create it so we can all keep moving forward together."

Later in the speech, Zuckerberg's voice cracked with emotion as he talked about a high school student he mentors who is living in the U.S. illegally. When Zuckerberg asked him what he wants for his birthday, the student started talking about others he wanted to help, and asked for a book on social justice.

"Here is a young guy who has every reason to be cynical," Zuckerberg said, his eyes welling with tears. "He wasn't sure if the country he calls home—the only one he's known—was going to deny him his dream of going to college. But he wasn't feeling sorry for himself. He wasn't even thinking of himself."

If he can do this, Zuckerberg said, "then we owe it to the world to do our part too."

Zuckerberg isn't all talk on this front. He signed the "Giving Pledge" commitment to donate the majority of his money in 2010; five years later, he upped that to 99 percent. Together with his wife, pediatrician Priscilla Chan, he formed the Chan Zuckerberg Initiative, a philanthropic organization focused on advancing science and education.

HONORARY DEGREE

Zuckerberg follows another famous Harvard dropout, Bill Gates, who spoke before its graduates a decade ago. Apple co-founder Steve Jobs, who dropped out of Reed College in Oregon, gave Stanford's commencement speech in 2005, reminding students to "stay hungry, stay foolish."

In addition to delivering the speech, Zuckerberg received an honorary degree, 12 years after dropping out of Harvard, and was subsequently introduced to graduates as "Dr. Mark Zuckerberg." Others receiving honorary degrees included the actress Judi Dench, the composer John Williams (known for "Star Wars," ''Harry Potter" and many other scores) and Somali human rights activist and physician Hawa Abdi Dhiblawe.

"If I get through this speech today it'll be the first time I actually finish something here at Harvard," Zuckerberg said. He did.

Facebook CEO and Harvard dropout Mark Zuckerberg, left, is presented with an honorary Doctor of Laws degree by Vice President and Secretary of Harvard University Marc Goodheart, right, during Harvard University commencement exercises, Thursday, May 25, 2017, in Cambridge, Mass. (AP Photo/Steven Senne)

Dear, Harvard: 10 memorable quotes from Zuckerberg's speech

Facebook CEO Mark Zuckerberg returned to Harvard with a message on fighting inequality and taking risks in the name of innovation.

Zuckerberg, who, like the graduates, is a millennial, started Facebook in his Harvard dorm room in 2004. He dropped out the following year and returned Thursday to receive an honorary degree.

Here are 10 excerpts from his commencement speech:

___

"Let's face it, you accomplished something I never could. If I get through this speech today, it'll be the first time I actually finish something here at Harvard."

Facebook CEO and Harvard dropout Mark Zuckerberg, center, greets graduating Harvard students as he walks in a procession though Harvard Yard at the start of Harvard University commencement exercises, Thursday, May 25, 2017, in Cambridge, Mass. Zuckerberg is giving a commencement address at Harvard, where he dropped out 12 years ago to focus on Facebook. (AP Photo/Steven Senne)

___

"My best memory from Harvard is meeting Priscilla. I had just launched this prank website Facemash, and the ad (administrative) board wanted to 'see me.' Everyone thought I was going to get kicked out. My parents drove up here to help me pack my stuff. My friends threw me a going-away party. Who does that? As luck would have it, Priscilla was at that party with her friends. And we met in line for the bathroom in the Pfoho Belltower (a dorm), and in what must seem like one of the all-time most romantic lines, I turned to her and said: 'I'm getting kicked out in three days, so we need to go on a date quickly.'"

___

"Ideas don't come out fully formed. They only become clear as you work on them. You just have to get started. If I had to know everything about connecting people before I got started, I never would have built Facebook."

___

"It's really good to be idealistic. But be prepared to be misunderstood. Anyone working on a big vision is going to get called crazy, even if you end up right."

In this Tuesday, May 23, 2017, photo, provided by Facebook, CEO Mark Zuckerberg looks out the window in his old dorm room at Harvard University, in Cambridge, Mass. Zuckerberg started Facebook in his dorm room in 2004, and also met his wife, Priscilla Chan, at Harvard. On Thursday, May 25, Zuckerberg will give the commencement address at the university, where he dropped out years earlier to focus on Facebook. (Courtesy of Ommanney/Facebook via AP)

___

"There is something wrong with our system when I can leave here and make billions of dollars in 10 years while millions of students can't even afford to pay off their loans, let alone start a business."

___

"Every generation expands its definition of equality. Previous generations fought for the vote and civil rights. They had the New Deal and Great Society. And now it's time for our generation to define a new social contract."

Facebook CEO and Harvard dropout Mark Zuckerberg, right, gestures as actor James Earl Jones, left, looks on while seated on stage during Harvard University commencement exercises, Thursday, May 25, 2017, in Cambridge, Mass. Zuckerberg was presented with an honorary Doctor of Laws degree Thursday and gave a commencement address at Harvard. (AP Photo/Steven Senne)

___

"We should explore ideas like universal basic income to make sure that everyone has a cushion to try new ideas. We're all going to change jobs and roles many times, so we need affordable child care to get to work and health care that's not tied to one employer."

___

"Millennials are already one of the most charitable generations in history. In just one year, more than three in four U.S. millennials donated to charity and more than seven in 10 raised money for another one. But it's not just about giving money. You can also give time. And I promise you, if you just take an hour or two a week—that's all it takes to give someone a hand and help them reach their potential."

In this April 18, 2017, file photo, Facebook CEO Mark Zuckerberg speaks at his company's annual F8 developer conference in San Jose, Calif. Zuckerberg is scheduled to give a commencement speech at Harvard, the university he dropped out of years ago to create Facebook, on Thursday, May 25. (AP Photo/Noah Berger, File)

___

"Every generation expands the circle of people we consider 'one of us.' And in our generation, that now includes the whole world. ... But we live in an unstable time. There are people left behind by globalization across the whole world. And it's tough to care about people in other places when we don't first feel good about our lives here at home. There's pressure to turn inwards."

___

"This is the struggle of our time. The forces of freedom, openness and global community against the forces of authoritarianism, isolationism and nationalism. Forces for the flow of knowledge, trade and immigration against those who would slow them down. This is not a battle of nations. It's a battle of ideas."