State Rep. Justin J. Pearson, one of the Tennessee House members who was expelled from that chamber and then reinstated, told an enthusiastic crowd Wednesday that Boston’s civil rights history inspired him, but that the city still has “way too many injustices.”

Pearson appeared on stage at Harvard’s Kennedy School alongside anti–gun violence activist David Hogg, a Harvard senior and survivor of the 2018 shooting at Marjory Stoneman Douglas High School in Parkland, Florida, that killed 17 people.

Democratic state Reps. Pearson, Justin Jones and Gloria Johnson had protested March 30 inside the Tennessee House chamber against the Republican leadership’s refusal to hear arguments on gun safety legislation. Pearson and Jones, who are both Black, were expelled earlier this month and then reinstated by local officials in their districts. Johnson, who is white, was spared expulsion by a single vote.

During Wednesday's discussion at Harvard, Pearson and Hogg both spoke of the importance of pursuing gun control legislation and supporting candidates — including President Joe Biden — who will make the issue a priority.

Pearson delivered a stirring oratory that brought many in the audience to their feet. In an interview before the start of the program, Pearson told reporters that he draws some of his oratorical inspiration from an earlier generation of Black leaders in Boston, where he once lived.

“You know, Dr. King [Martin Luther King Jr.] and Malcolm X spent time in Boston, and I was like, what is it about this place?” he said jokingly.

Pearson came to Boston in 2017 after graduating from Bowdoin College in Maine, and took a job as a community organizer with Year Up, a nonprofit workforce training program for economically disadvantaged youth.

“I lived in Roxbury, where Malcolm X lived with his sister, and learned about the Black culture that was there — Bay State Banner and all these types of things — and their importance.” Pearson said. “But Boston has really been extraordinarily helpful in shaping who I am as a person and as a leader.”

Pearson also became a member of Boston’s Union United Methodist Church in the South End, which he still attends virtually from his home in Memphis.

“Union is a great church,” he said. “The reason I went to Union is I walked in and I said, ‘This has to be what heaven looks like.’ It is one of the most diverse churches I've ever been in, of people across various socioeconomic status.”

But Pearson said the city of Boston itself has a long way to go to bridge the wide gap of economic inequality among races and ethnic groups. He pointed to an often-cited 2015 Federal Reserve Report that concluded the median net worth for white households in Greater Boston was a quarter million dollars, but just $8 for Black families.

“People need to get proximate to the poor folks in Roxbury and Dorchester and Mattapan to help create change in this place, too, because there are way too many injustices, particularly economic, that are connected to the social and racial injustices of the history of Boston,” Pearson said.

He made the same point during the main presentation before an audience of about 200 at Harvard’s Institute of Politics.

“He nailed it,” said George “Chip” Greenidge, who was among those in attendance.

Greenidge is a local activist and organizer who heads up the nonprofit Greatest Minds. He said he was moved by Pearson’s comments about the fight for democracy and equality nationwide. “But he also didn't let Boston off the hook," said Greenidge. "He said, ‘We know about you brothers and sisters up here.’ So I'm glad he put that call out. Let's not just pity what's going on in Tennessee. Boston has its own work to do.”