It is quite hard to determine what Shakespeare’s attitude towards slavery is. This is because we only really know who he was through his plays, and it is hard to know whether the opinions portrayed in them are his own, or merely those of his characters.
Shakespeare uses a lot of characters of different races in his works. One such example is Caliban, from the Tempest, who is a character based on the native Americans; ‘Carib’ is the name of the original inhabitants of the island that Christopher Columbus landed on. Shakespeare illustrates how Caliban is an uneducated and vicious person, through describing how he raped Miranda, but he also shows how he is hated by Prospero and is being treated badly. Also, at the end of the book, Caliban is set free by Prospero, which could show that Shakespeare wants equality and justice. I find this all quite hard to interpret, but given the last point, I would say that Shakespeare does not like the idea of slavery and wants everyone to have equal freedom, regardless of race.