Hot startup toymaker GoldieBlox—which makes games that expose girls to engineering, and was featured in a Super Bowl commercial—has settled its lawsuit with the Beastie Boys.

The legal dispute centered on the hip-hop band's 1980s hit "Girls," which was used in a parody toy video that went viral earlier this year.

The settlement includes a public apology, and a portion of the Oakland, Calif., toymaker's revenue going toward science education charities—as selected by the band.

GoldieBlox's apology will be posted on the toymaker's website, according to a statement emailed to NBCNews.com from a GoldieBlox representative.

A Beastie Boys spokesman offered no additional comment, referring to the settlement detailed in the statement from GoldieBlox. 

The settlement also includes payment by GoldieBlox, based on a percentage of its revenues, to one or more charities selected by the Beastie Boys that support science, technology, engineering and mathematics education for girls, according to the statement.

The settlement ends the legal battle between the band and toy company, which got its start from a humble Kickstarter crowdfunding campaign in 2012.

GoldieBlox, now a small business run by about a dozen staffers in the San Francisco Bay area, shot to national fame in November last year. It launched the "Princess Machine," an online video that showcases three girls.

Using actual GoldieBlox toys, the girls (toy users) turn a home into a clever Rube Goldberg-like machine of obstacles. Part social commentary on what traditionally has been available in girls' toy aisles, the video racked up millions of YouTube views.

The video's sassy lyrics were set to the repurposed Beastie Boys song. The band took notice. And in November, GoldieBlox filed suit, seeking to pre-empt possible claims of copyright infringement over the repurposed song. The band filed a countersuit.

(Read moreFrom Kickstarter to the Super Bowl: GoldieBlox wins commercial spot)

The legal scuffle came amid the meteoric rise of the toy start-up. GoldieBlox is a series of interactive books, combined with construction toys starring Goldie. Her stories encourage girls to develop concepts and skills that are fundamental to engineering.

(Read moreGoldieBlox: Rebelling against the pink princess, toy complex)

Earlier this year, GoldieBlox beat 15,000 entrants to win a coveted commercial slot in February's Super Bowl—worth millions, and believed to be the first spot ever showcasing a small business. The Super Bowl ad, however, was not the original viral video that was featured the "Girls" song.

More from CNBC