With so many racist and segregationist Southern Democrats in the party, I imagine many black voters looked to the Republicans, or that the idea that you were a Democrat wasn't passed down by your parents and grandparents so it there wasn't any affiliation in the family with the Democrats. There were probably many that didn't trust either party to really advocate for black people.
I know that Philadelphia was once very Republican (with a machine running the city) and there were probably a lot of black votes for Republicans there.
As for Massachusetts, all I know is Edward Brooke.
Edward Brooke was an African-American Republican U.S. Senator from Massachusetts from 1967-1979. I would be curious to how African Americans in Massachusetts voted in 1966, 1972, and 1978.