The struggle between Michael and Satan is mostly rooted in Revelation 12:
Then war broke out in heaven. Michael and his angels fought against the dragon, and the dragon and his angels fought back. But he was not strong enough, and they lost their place in heaven. The great dragon was hurled down—that ancient serpent called the devil, or Satan, who leads the whole world astray. He was hurled to the earth, and his angels with him.Evidence of this fight is also found in Daniel 10, where Michael is described as fighting against the spirit prince of Persia (Babylon). As the angel says to Daniel:
But the prince of the Persian kingdom resisted me twenty-one days. Then Michael, one of the chief princes, came to help me, because I was detained there with the king of Persia.But the strangest and most enigmatic place we find Michael and Satan squaring off in is Jude 9:
But even the archangel Michael, when he was disputing with the devil about the body of Moses, did not himself dare to condemn him for slander but said, “The Lord rebuke you!"Huh? What's going on in this text?
The writer of Jude assumes knowledge of a story about the assumption of Moses into heaven. From what we can surmise, Satan was preventing or objecting to Moses entering heaven. Most likely bringing some sort of accusation against Moses, like his murder of the Egyptian or his disobedience at Meribah. Michael rebukes Satan, presumably making the way clear for Moses to enter heaven.
The source for this story about Michael and Satan fighting over the body of Moses is unclear. It could be a story from the Jewish apocryphal book The Testament of Moses.
Or it could be a story that the writer of Jude (and/or others) pieced together from threads found in the book of Enoch and a story we find in Zechariah 3, where an unnamed angel rebukes Satan with the exact same words from Jude 9 when Satan brings accusations against the High Priest.
Regardless, Jude 9 is another place where we see Michael and the devil squaring off.