Two racially charged incidents at Fenway Park, on consecutive nights in May, made it clear to the city’s sports and civic leaders that they had to do something to address a problem that has haunted Boston for decades. In the aftermath, the area’s five major sports franchises — the Red Sox, Patriots, Celtics, Bruins, and Revolution — quietly began meeting to devise a joint effort to combat racism. Later this month, at a Fenway event, the teams will unveil the beginning of their project: a public service announcement featuring athletes calling on fans to take a stand against racism and hate speech at sports venues. Each of the teams has agreed to prominently play the video in their venues. Dubbed “Take the Lead,” the project is an effort to use the influence of the area’s sports teams — and athletic stars — to lead a discussion on an issue that Boston has struggled to confront head-on. “When the incidents in May occurred, one of the first things we recognized was sports teams are high-profile, and we have the opportunity to help lead a high-level discussion around this,” Red Sox CEO Sam Kennedy said in an interview. “We wanted to take the lead in taking a stand against racism.” In the first of the incidents that inspired the project, Baltimore Orioles outfielder Adam Jones, who is black, was the target of a racial slur hurled from the stands. Later in the same game, Jones said, a bag of peanuts was thrown at him. The following night, after a Kenyan woman sang the national anthem, a white fan used a racial slur in a derogatory description of her performance. The fan’s remark was made to Calvin Hennick, a white man attending the game with his young biracial son. Hennick complained to ushers, who threw the fan out of the ballpark. The Red Sox have said that the fan is permanently barred from Fenway Park.