I am not sure, but I do recall seeing one time that Northern Blacks self-identified as Republicans at a 60/40 rate (in a two-way split with Democrats) by the 1880s ... that is obviously MUCH earlier than conventional/lazy political narratives of them being reliably Republican until the Progressive Era. So, given Massachusetts was a state with relatively little racial tension compared to other areas of the country, this would not surprise me.
On another somewhat related note, I also recall seeing that the Southern Blacks who could vote remained more Republican than their Northern counterparts for longer, possibly even voting plurality for Eisenhower in many areas.
For instance, there was a Black Democratic Club in Missouri in the late 1800's. Formed because they felt the state GOP took them for granted. The reference is in an unlikely place:
Mystery Train by Greil Marcus.
As for MA having fewer race problems. By the 1920's - 1930's, Boston had the worst race relations of any city in the north. The Red Sox were the last team in MLB to have a Black player (1959). The Celtics, for all their championships in the late 1950's and early 1960's, had mediocre attendance because so many people in the area hated the very concept of Bill Russell (his house was even broken into and vandalized by racists).