While Massachusetts has long had a reputation as a very liberal state, it is only deceptively and sporadically so. For example, even before the Revolutionary War and into the Civil War, Massachusetts was a leader and key player in slavery. With Rhode Island, it was one of the first colonies to import and sell slaves. Later when the scale of New England agriculture did not support the economics of slavery, Massachusetts provided the ships, captains and crews that kept the triangular slave trade in business.
Yet, it also has the reputation as a hotbed of abolition. Even here, it depended on whether you profited from the slave trade. One anti-slavery leader, for example, the Federal Street Church's Rev. William Ellery Channing, did not make his abolition speeches from his pulpit. This founder of American Unitarianism had go to other churches and public halls for that. The board of his church (which later became the Arlington Street Church) forbade him from discussing slavery.
During the colonial period, Massachusetts was not the first to pass laws against interracial marriage. That distinction belongs to Virginia, which passed the first in 1691. "(T)he punishment was banishment from the community. By 1750, Maryland, Massachusetts, North Carolina, Delaware, Pennsylvania and Georgia passed similar laws."
The Massachusetts version included a whiteness test. A white person would marry someone with one black and three white grandparents.