Some of the biggest names in rap music attended a groundbreaking ceremony this week for the Universal Hip Hop Museum — an $80 million facility in South Bronx that will open in 2024 and become the world’s first-ever exhibit to celebrate the genre.

Music legends Grandmaster Flash, LL Cool J, Slick Rick, Nas, Chuck D, and Fat Joe joined city and state officials Thursday, planting shovels into the same ground where the customs and traditions of hip hop originated some 50 years ago.

“Let me just do a really important official act here,” New York Mayor Bill de Blasio said, while also quoting from “The Message,” Flash’s classic 1982 song. “Set some history straight. There are some good people on the West Coast, they did some good things. But hip hop was born in the Bronx,” he said.

The museum, which is being financed through city, state, and private donations, will chronicle the historic journey of the five pillars of hip hop culture: DJing, breakdancing, graffiti art, knowledge, and MCing.

The groundbreaking, just a stone’s throw from Yankee Stadium, was an emotional moment for the artists who have witnessed hip hop culture rise over many decades from the esoteric expressions of poor street kids to the tour de force it is today, with multiple art forms assimilated into mainstream life around the world.

“This is a really special time,” said Grandmaster Flash, a first-generation rap artist who choked up Thursday as he recalled the infancy of the genre. “There was a time where nobody gave a f--- about the Bronx. Nobody cared. This thing we were doing was anti-everything.”

Three years from now, Flash and the other rappers at Thursday’s event will be honored in the halls of the museum, where their legacies will be preserved for future generations.

“Hip-hop began here in the South Bronx by black and brown kids who were just looking to have fun and stay out of harm’s way back in the ’70s,” said said Rocky Bucano, the museum’s executive director. “And now this museum will provide educational resources, work force development and just a way to provide economic empowerment.”

The momentous salute to the genre is “long overdue,” said Bronx Borough President Ruben Diaz Jr.

“Hip hop has continued to mature. It started from the early days of young boys and girls who saw the rest of the world ignore us ... Showing the rest of the world the injustices that were happening in the South Bronx, in East New York, in Manhattan, in Harlem. God bless you all, and God bless hip hop,” he said.

Construction on the first phase of the development called Bronx Point began in February on the banks of the Harlem River.

The 52,000-square-foot museum will serve as the “cultural anchor” to the site that, once completed, will feature 542 permanent affordable housing units with a total value of $349 million.

On Thursday a $4.2 million dollar check was presented at the groundbreaking ceremony.

The 22-story building will rise on a long-undeveloped sliver of waterfront property owned by the city that became available for lease five years ago. Private developer L+M Development and Type A are handling the construction.

“It’s a long journey, but a very worthwhile journey to see what should have happened already is finally happening,” Bucano said. “The museum represents the creativity and the free expression that came out of this community and now has become the most powerful art form in the entire world.”

The museum will open the same year that breakdancing — one of the more dynamic and enduring outgrowths of the hip-hop movement — officially becomes an Olympic sport at the Paris Games.

The gravity-defying dance style originated in the Bronx and developed throughout the 1970s. By the 1980s, the dance moves were being glamorized in Hollywood films such as “Breakin’” and “Beat Street.”

As an urban creation, its first practitioners were primarily of African-American and Puerto Rican descent.

The idea for the museum was hatched a decade ago, with Bucano pushing for such an honor in the birthplace of hip hop, according to reports.

“Well, hip hop originated here back in 1973,” Bucano told The New York Post. “Hip-hop is the most popular art form in the entire world, which is now getting ready to celebrate its 48th anniversary this year. And it’s almost sacrilegious that a creative art form doesn’t have its own place where the history can be preserved to celebrate. This museum will serve as the home of hip-hop history and culture for the world.”