Boston Mayor Martin J. Walsh used his convocation address to the largest-ever class of BUSPH graduates to correct what he described as a flawed story line about his journey to the city’s highest office – and to appeal to the graduates to “aim high and set ambitious goals.”

Walsh, who won the mayor’s office last November, captivated the 315 students and their families assembled Saturday in Agganis Arena with his story of battling childhood cancer, at age 7, then overcoming alcoholism as a young adult. But he said that narrative left out a crucial element: The role that community had played in his recovery.

“I’m proud of how I persevered — but the truth is, the story is about strong communities, and it’s a story about public health,” said Walsh, who grew up in a working-class family in Dorchester, the son of Irish immigrants. “Looking back, the real resilience lay in [my parents] and in the community they had built. We didn’t have a lot of money, but we had a good strong neighborhood, church . . . and my father had benefits” through a laborers’ union. “And we lived close to great hospitals.”

Walsh became Boston’s first new leader in more than two decades, following long-serving former Mayor Thomas Menino’s decision not to seek re-election. He credited both professionals in the health care and addiction-recovery fields, and neighbors and friends in the community, with helping him to come back from illness and realize his childhood dream of serving as the city’s mayor.

The former state representative urged the graduates to use their skills to bridge the divide between clinicians and the community, and to emulate public health leaders such as Dr. Paul Farmer, who founded the humanitarian health organization Partners in Health, and Dr. Howard Koh, a BUSPH alum who is now Assistant Secretary for Health in the Obama administration.

“You can use the tools of public health to change the world,” Walsh said in a thick Boston accent, looking out at a sea of red robes. “I felt that power of change at a deep level, and it saved my life twice.”

He appealed to the students – some who worked on public health issues in Boston during their studies – to view his administration as a “willing partner” in tackling problems such as addiction, trauma and violence.

“We need you to help solve the greatest challenges that confront us,” he said. “We need your energy, we need your expertise, and we need your leadership.”

In April, a Public Health Working Group Transition Team, co-chaired by David Rosenbloom, head of the SPH Department of Health Policy and Management, released a report recommending “immediate attention” to the two most pressing threats to the public health of city residents: addition and violence. Walsh recently announced the creation of a new Office of Recovery Services, under the oversight of the Boston Public Health Commission, which will work to improve existing addiction and recovery services.

“As public health professionals,” Walsh told the graduates, “you will be uniquely positioned to bridge the gap between the medical and the recovery community. And I ask you for help in doing so.”

Walsh recounted the two defining struggles in his life: being diagnosed with Burkitt’s lymphoma as a child, and quitting alcohol at age 30. Although he was often praised for being brave as he underwent four years of chemotherapy, he said, his personal resolve was eclipsed by support from his family, the wider community, and medical professionals.

“In hundreds of different ways, (the community) let us know that we weren’t going through this alone,” he said. His recovery “took research, surgery, diagnosis and technology. It took caring doctors and nurses at Children’s Hospital and Dana Farber Institute… and my family having access to those treatments.”

In a stark reminder, he added: “The same cancer I survived in the ‘70s is killing thousands of African children every year, simply because they don’t have access to chemotherapy.”

Walsh said his battle with alcoholism started when he dropped out of Suffolk University after one semester because he wasn’t motivated to pursue his studies. He recounted drinking so heavily that “I lost myself inside.” In April 1995, he went into detox and began the recovery process, aided by professionals and recovery groups.

“Recovery stories in the media often describe the heroic journeys of individuals. But once again, it took a community,” Walsh said.

A year and a half after getting sober, Walsh ran for state representative. For the next 16 years, he made his mark in the legislature by working on issues including addiction, education and workers’ rights. Sober for 19 years, he still attends Alcoholics Anonymous meetings.

Looking back now, Walsh said he never could have envisioned that his story would play out as it has.

“It wasn’t a smooth path, it wasn’t a straight path – there were obstacles and surprises, twists and turns,” he said. “It was filled with challenges. There were even times when I gave up hope.

“Any number of moments, if you had told someone who knew me that one day, I’d be the mayor of the city of Boston, they probably would have laughed,” he said. “I might have laughed, too, at certain moments.”

Walsh said he hoped his story would inspire the graduates to hold firm to their goals, even if misfortunes or bad decisions derail them.

“My story is about doing more than you thought was possible with your life . . . We need you to aim high and set ambitious goals.”

In all, 590 BUSPH students graduated in 12 different degree programs. The graduation ceremony included a short tribute to SPH Dean Robert Meenan, who is stepping down this year, after 22 years, to become a special assistant to BU President Robert A. Brown.

Harold Cox, associate dean for public health practice, said Meenan was known for his accessibility, fairness and affability – and, in an aside that brought laughs from the crowd, for his love of beer. Meenan is BU’s longest-serving dean – and the longest-serving dean of a public health school in the country.

Graduate Christina Gebel, the student speaker, thanked the SPH faculty for “being the most accessible faculty in education today.” She noted that several tragic events had occurred during the graduates’ time at SPH, including the bombings at the Boston Marathon and Typhoon Haiyan in the Phillipines.

“Our class has seen tragedies we could never have imagined two years ago,” Gebel said. “Let us remember to keep one eye always on social justice . . . looking more deeply at the root causes of the public health problems of the world.”

Two faculty members were honored for their teaching and scholarship: Sophie Godley, clinical assistant professor of community health sciences, received the Norman A. Scotch Award for Excellence in Teaching, and Alan M. Jette, professor of health policy and management, received the Faculty Career Award in Research and Scholarship.