They were inducted alongside the Electric Light Orchestra (ELO), Journey and Yes during a concert in New York.
However, it was not just a celebration: a number of artists chose to use the occasion to make impassioned pleas and remember lost friends.
Tupac's award was collected by his friend, fellow rapper Snoop Dogg.
Folk singer Baez - as known for her activism as her singing - made a rallying call for resistance in the face of "the new political cultural reality".
The 76-year-old, who admitted most younger people had never heard her work, made a return to the spotlight this week when her song Nasty Man went viral.
Baez - imitating Donald Trump's particular way of speaking - told the audience gathered at Brooklyn's Barclays Center: "Let us together repeal and replace brutality and make compassion a priority. Let us build a great bridge, a beautiful bridge, to welcome the tired and the poor."
Pearl Jam frontman Eddie Vedder tackled climate change, saying: "We cannot be the generation that history will look back upon and wonder, why didn't they do everything humanly possible to solve this biggest crisis of our time?"
Snoop Dogg was on hand to collect Tupac's trophy, more than two decades after he was shot dead in Las Vegas.
Calling Tupac "the greatest rapper of all time", he recalled how they were just "two black boys struggling to become men", adding: "To  be human is to be many things at once: strong and vulnerable, hard-headed and intellectual, courageous and afraid, loving and vengeful, revolutionary and, oh yeah... gangsta!"
Tributes were also paid to 1986 Hall of Fame inductee Chuck Berry. who died last month aged 90, with ELO playing one of his best known hits - Roll Over Beethoven.
Meanwhile, Nile Rodgers - lead guitarist of disco band Chic - was recognised for his contribution to production.
The late rapper Tupac Shakur, 1960s protest singer Joan Baez and grunge legends Pearl Jam have all entered the Rock and Roll Hall of Fame.