To answer this question, you need to define, what ancient times means and what middle ages means.
The so called Transformation Theory (one of the Big Three theories) claimed, that Rome never fell. Empires usually don't fall, they just transform. Pirenne, one historian of this school, defined the ancient times as a culture based on the mediterrenean sea as the central hub for trade, communication, cultural exchange and everything. So the ancient times ended, when the mediterrenean sea lost its role as the central hub of ancient times.
This happened, when the Arabs conquested the southern shores of the mediterrenean sea with Syria, Egypt and Africa (latest done 711). From now on, the mediterreenan sea was more of a dividing border than a connecting hub. And so the ancient times ended, and the early mid ages (aka dark ages) began. Now also ancient roman empire ended, and transformed into the medieval roman empire in the east and the loosely coupled chatolic western europe under the lead of the pope.
So if you like to start the medieval ages earlier, you have to destroy this hub earlier. A succesful persian invasion of Syria, Africa and Egypt during the 3d century crisis might do the trick. But I doubt this would damage the hub as it did with the arabs. The hostility and cultural difference is not that strong. So you might need christianity and islam in order to succesfully destroy the hub.