Are Shakespeare's works written in Middle English?
No. The works of William Shakespeare are written in what is known as Early Modern English. Middle English was used between the late 11th and late 15th centuries. Shakespeare was born in 1564, well after the date of 1470 that is usually given as the end of the era of Middle English.
A major piece of literature that was written in Middle English was The Canterbury Tales by Geoffrey Chaucer. If you look at a little bit of that work in the original, you will see how different it is from original Shakespeare material. Here is the beginning of Chaucer's work in the original:
Chaucer's Middle English is essentially unintelligible to us whereas Shakespeare's language is archaic, but basically understandable in the original.
Thus, it is clear that Shakespeare is not writing in the same language as Chaucer.