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.
I hypothesize that this was in part due to the following reasons
1. The state- and local-level Republican Parties in the South (excluding Appalachia and perhaps also the Ozarks) were, to a large extent, organizations that essentially existed for the primary purpose of being pro-Black social, cultural, and political institutions - of, by, and for Black people. This was not the case at all in the North (save perhaps for some Black-majority areas within certain major cities such as Chicago and Philadelphia, as well as some of the small number of rural Black communities in the North, such as Pembroke Township IL, Alexander County, IL, or Eastern Shore counties in Maryland).
2. White supremacy/White racial interests were a key component of the Democratic Party platform in the South relative to the Republican Party in the South - further cementing the popular conscious and subconscious understanding of the Republican Party as innately being the intrinsically "Black party" (similar to de-facto status of the Democratic Party today as, unfortunately, being the intrinsically "Black Party" in most places post-1964) - whereas this was not nearly as true (but still definitely true at all) of the Democratic Party in the North relative to the Republican Party in the North.
3. The "60-40" figure, which is featured in the Wikipedia's article on the Third Party System (which is where I first saw the figure before I read your post, and where I imagine you have seen the figure if not also from someplace else) is a figure (estimate? canvass?) that comes from a book,
The Third Electoral System 1853–1892 (1979), by an author named Paul Kleppner (as sourced in the Wiki article). Before World War I and the contemporary "Great Migration," the large majority of Northern Blacks were disproportionally college-educated, high-school graduated (to the extent that was an applicable category back then), upper- or upper-middle-class, higher-income, and (I would wager) ideologically left/liberal-leaning relative to the Southern Black population and to the Black American population as a whole; therefore, they almost certainly were much more likely Dem voters than the Southern or Nationwide Black population at the time.